bayphillips / compatible-alert-controller Goto Github PK
View Code? Open in Web Editor NEWAn iOS7 compatible UIAlertController written in Swift
License: MIT License
An iOS7 compatible UIAlertController written in Swift
License: MIT License
I could not compile the demo project.
Steps to reproduce.
I get the following build error
ld: file not found: /Users//Library/Developer/Xcode/DerivedData/BPCompatibleAlertControllerDemo-dakohkknawpcjndqdoakidbexzhz/Build/Products/Debug-iphonesimulator/CompatibleAlertControllerDemo.app/CompatibleAlertControllerDemo
clang: error: linker command failed with exit code 1 (use -v to see invocation)
We need to support allowing for 1 (or more for iOS 8) text fields in the alerts. It'll be interesting to handle the UIAlertViewStyleSecureTextInput
and UIAlertViewStyleLoginAndPasswordInput
for iOS 7. Perhaps some class functions/factory methods to create specific types of inputs.
Swift 2.0 added the ability to mark classes as available based on OS version. The biggest issue we'll have is that you cannot mark individual stored properties as available to different versions. This means that the BPCompatibleAlertController
cannot have instances of both UIAlertView
_and_ UIAlertController
in it.
Anyone have any thoughts on the issue? Maybe we'll have to add a protocol that shows a subclass of ours, one that wraps an UIAlertView
and another UIAlertController
and have that protocol instantiate them appropriately based off of the OS version? Just an initial idea that I haven't had time to play around with yet.
Hi, I'm targeting an iOS 7.0 app. I'm experiencing some peculiar behavior with the following code:
let alertController = BPCompatibleAlertController(title: "Alert Title", message: "Alert Message", alertStyle: BPCompatibleAlertControllerStyle.Alert)
alertController.alertViewStyle = UIAlertViewStyle.Default
let defaultAction = BPCompatibleAlertAction.defaultActionWithTitle("Cancel", handler: { (action) in
})
alertController.addAction(defaultAction)
let removeAction = BPCompatibleAlertAction.destructiveActionWithTItle("Remove", handler: { (action) in self.removeChild(child)
})
alertController.addAction(removeAction)
alertController.presentFrom(self, animated: true, completion: { () in })
The problem here is that even if you switch the texts "Cancel" and "Remove", they will always end up in the same position. Remove as the left button and Cancel as the right. This is odd in that the default action in the demo shows up on the left.
What I'm aiming for is "Cancel" on the left and "Remove" on the right, but switching the strings does not seem to help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.