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