RMUniversalAlert icon indicating copy to clipboard operation
RMUniversalAlert copied to clipboard

Issue with iOS 7.1

Open chrise86 opened this issue 9 years ago • 4 comments

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.

chrise86 avatar Mar 16 '15 15:03 chrise86

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.

ryanmaxwell avatar Mar 16 '15 18:03 ryanmaxwell

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.

chrise86 avatar Mar 17 '15 09:03 chrise86

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.

ryanmaxwell avatar Mar 17 '15 19:03 ryanmaxwell

I don't :( guessing it must be a similar issue with another Pod or something...

chrise86 avatar Mar 17 '15 20:03 chrise86