Git Product home page Git Product logo

compatible-alert-controller's People

Contributors

bayphillips avatar github-user32 avatar paludis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

compatible-alert-controller's Issues

linker error

I could not compile the demo project.
Steps to reproduce.

  1. download zip from https://github.com/BayPhillips/compatible-alert-controller/archive/master.zip
  2. unzip into /Users//Developer folder
  3. navigate to /Users//kDeveloper/compatible-alert-controller-master/BPCompatibleAlertControllerDemo
  4. double click on BPCompatibleAlertControllerDemo.xcodeproj
  5. select a simulator and press run in xcode

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)

Support textfield input in the Alerts

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 Support

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.

Default and Destructive always the same position no matter if text is switched

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.