UIImagePickerController not presenting in iOS 8

后端 未结 12 1578
借酒劲吻你
借酒劲吻你 2020-12-12 16:39

Is anyone else having an issue with UIImagePickerController in iOS 8? The method below works perfectly well in iOS 7 on an iPad, but I get the following error

12条回答
  •  盖世英雄少女心
    2020-12-12 16:59

    I agree with Ben Lings issue detection. I would suggest a simpler solution in case when using UIActionSheet. I simply moved my code that reacts on Action Sheet selection from:

    - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex;
    {
    // my code
    }
    

    into:

    - (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex;  // after animation
    {
    // my code
    }
    

    This way app is guarantied that code will be executed AFTER UIActionSheet animation finishes.

    Since UIAlertView has similar delegate method:

    - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex;  // after animation
    {
    // my code
    }
    

    I suppose that similar solution may apply.

提交回复
热议问题