ios - UIAlertController as ActionSheet not correctly sized in iPad -


currently issue facing while showing uialertcontroller uialertcontrollerstyleactionsheet it's preferred style, , adding button uialertactionstylecancel results in display problems. the presented _uipopoverview's frame isn't large enough display whole action sheet.

here code:-

- (ibaction)showactionsheet:(uibutton *)sender {     [self presentactionsheetfromsender:sender withcancelbuttonstyel:uialertactionstylecancel]; }    - (void)presentactionsheetfromsender:(uibutton *)sender withcancelbuttonstyel:(uialertactionstyle)cancelbuttonstyle {     uialertcontroller *alertcontroller = [uialertcontroller alertcontrollerwithtitle:@"testcontroller" message:@"testmessage" preferredstyle:uialertcontrollerstyleactionsheet];     alertcontroller.popoverpresentationcontroller.sourcerect = sender.bounds;     alertcontroller.popoverpresentationcontroller.sourceview = sender;      [alertcontroller addaction:[uialertaction actionwithtitle:@"cancel" style:cancelbuttonstyle handler:^(uialertaction *action) {         [alertcontroller dismissviewcontrolleranimated:yes completion:nil];     }]];      [self presentviewcontroller:alertcontroller animated:yes completion:nil]; } 

so current issue actionsheet shows title , message, cutting off cancel button.

uialertcontroller *alertcontroller = [uialertcontroller alertcontrollerwithtitle:@"testcontroller" message:@"testmessage" preferredstyle:uialertcontrollerstyleactionsheet]; 

bcs set uialertcontrollerstyleactionsheet, uialertaction style uialertactionstylecancel not working.

you can change 1 of them fixed it.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -