Swift shows the bottom of the tool bar

Source: Internet
Author: User

The following page shows my message and the user can click the Edit button in the upper right corner to enter the deletion status. When you click the Edit button, the button text changes to "Cancel", the upper left corner of the button becomes "Select All", and the bottom toolbar is displayed with the "Delete" button

Implementation is quite simple, in the normal state click the Edit button in the method of writing:

Self.navigationcontroller?. Settoolbarhidden (False, animated:true) var btndelete = Uibarbuttonitem (title: "Delete", Style:UIBarButtonItemStyle.Plain, Target:self, Action: "Deleteaction") Self.settoolbaritems ([Btndelete], Animated:true)

The button in the upper left corner changes to "Select All"

var Selectallbutton = Uibarbuttonitem (title: "Select All", Style:UIBarButtonItemStyle.Plain, target:self, Action: "SelectAll") Navigationitem.leftbarbuttonitem = Selectallbutton

So easy!!!

Swift shows the bottom of the tool bar

Related Article

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.