Skip to content

Conversation

@sungjin-woo
Copy link
Contributor

@sungjin-woo sungjin-woo commented Nov 22, 2016

This PR is related to #20 issue.

When I show actionsheet on iPad using the following method, my app was always crashed without passing the popoverPresentationControllerBlock.

+ (instancetype)showActionSheetInViewController:(UIViewController *)viewController
                                      withTitle:(NSString *)title
                                        message:(NSString *)message
                              cancelButtonTitle:(NSString *)cancelButtonTitle
                         destructiveButtonTitle:(NSString *)destructiveButtonTitle
                              otherButtonTitles:(NSArray *)otherButtonTitles
             popoverPresentationControllerBlock:(void(^)(RMPopoverPresentationController *popover))popoverPresentationControllerBlock
                                       tapBlock:(RMUniversalAlertCompletionBlock)tapBlock;

So if the popoverPresentationControllerBlock is passed by NULL ,
I want to show the actionsheet on the center of parent view controller's view like UIActionSheet.

simulator_screen_shot

Please consider this PR.
Thank you.

…nsheet is NULL

If the popoverPresentationControllerBlock of actionsheet is NULL on using the actionsheet, the actionsheet will be shown in Center of the parent view controller.
@sungjin-woo sungjin-woo changed the title Fix iPad crash issue of actionsheet Fix iPad crash issue of the actionsheet Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant