Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iPad crash issue of the actionsheet #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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