iOS note "Uialertcotroller" 2017-09-06

Source: Internet
Author: User

1. Kind middle hint box-alert bottom Prompt box-actionsheet2. Menu item parameter title: Title cancels style: style. Cencel Handle:nil misoperation Add menu items to Uialertcontroller: Use the Addaction method to display menus: using self.present
MARK:-Table View delegate//cell click Override Func TableView (_ Tableview:uitableview, Didselectrowat Indexpath:indexpat h) {        //print ("You clicked on \ (indexpath.section) group, \ (Indexpath.row) line") Let   menu = Uialertcontroller (title: "Hint", Message: "You clicked \ (indexpath.section) group, \ (Indexpath.row) line", Preferredstyle:. Alert) let   option = uialertaction (title : "Confirm", Style:. Default, Handler:nil) let   option2 = uialertaction (title: "Cancel", Style:. Cancel, Handler:nil)   let Option3 = uialertaction (title: "Delete", style:. Destructive, Handler:nil)   menu.addaction (option)   menu.addaction (Option2)   Menu.addaction (Option3)   menu.addaction (option)   self.present (menu, Animated:true, Completion:nil)}

iOS note "Uialertcotroller" 2017-09-06

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.