I am familiar with this code: self.navigationItem.leftBarButtonItem = self.editButtonItem.
See this code:
class ThirdViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
@IBOutlet var tblTasks: UITableView! // declaring this allows you to reload the tableView to update your items
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.navigationItem.rightBarButtonItem = self.editButtonItem()
}
I have the code that allows for the edit button to be present, yet no edit button is to be seen in my app nor the storyboard.
I am a Swift beginner, if someone could point me in the right direction that would be awesome.
The stock "Edit" button is only available on UITableViewController. For other view controller types you'll have to create a button yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With