RMUniversalAlert
RMUniversalAlert copied to clipboard
Issue with iOS 7.1
When using RMUniversalAlert.showActionSheetInViewController
on iOS 7.1, my app crashes with:
expected Proc with 3 arguments (got 2)
This is in relation to the tapBlock callback.
Is this on the device or the simulator? Can you provide a code excerpt of where you are calling the action sheet? There are examples in the /Tests folder, and I have run it on iOS 7.1 simulator with success.
Simulator. It also says the same with alerts.
RMUniversalAlert.showActionSheetInViewController(self,
withTitle: nil,
message: nil,
cancelButtonTitle: "Cancel",
destructiveButtonTitle: deletable?(photo) ? "Delete" : "Report",
otherButtonTitles: nil,
popoverPresentationControllerBlock: -> (popover) {
popover.sourceView = self.tabBarController.tabBar
# popover.sourceRect = sender.frame
},
tapBlock: -> (alert, buttonIndex) {
if buttonIndex == alert.destructiveButtonIndex
if deletable?(photo)
delete_photo(photo)
else
report_photo(photo)
end
end
}
)
Actually using it in RubyMotion, hence the difference in syntax, but it works fine on iOS 8.
I don't suppose you have tapjoy installed? Ive had a reported conflict between that SDK and killing the Callbacks on UIAlertviews here https://github.com/ryanmaxwell/UIAlertView-Blocks/issues/17
As RMUniversalAlert on ios8 uses UIAlertcontroller that explains why it's working there.
I don't :( guessing it must be a similar issue with another Pod or something...