Skip to content

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

Description

@aloh86

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions