- (IBAction)buttonHandler:(UIButton *)sender

{

UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"title" message:@"message" preferredStyle:UIAlertControllerStyleActionSheet];

    [alert addAction:[UIAlertAction actionWithTitle:@"Enter" style:UIAlertActionStyleDefault handler:nil]];

    [alert addAction:[UIAlertAction actionWithTitle:@"Destructive" style:UIAlertActionStyleDestructive handler:nil]];

    [alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];

    [self presentViewController:alert animated:YES completion:nil];

}

參考資料:

http://www.cocoachina.com/ios/20141126/10320.html

http://stackoverflow.com/questions/32814383/check-...

http://flexmonkey.blogspot.tw/2015/10/forcesketch-...

arrow
arrow
    全站熱搜

    小賢 發表在 痞客邦 留言(0) 人氣()