"+" UIBarButton item to add list #4491

Closed
pravalgautam wants to merge 1 commit from sortedListAnd+ToAddList into master

View file

@ -35,6 +35,12 @@ final class BMCViewController: MWMViewController {
override func viewDidLoad() {
super.viewDidLoad()
viewModel = BMCDefaultViewModel()
let addButton = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(addTapped))
navigationItem.rightBarButtonItem = addButton
}
@objc func addTapped() {
createNewCategory()
biodranik commented 2023-03-07 11:16:09 +00:00 (Migrated from github.com)
Review

Will this work? (you likely need to add @objc annotation to createNewCategory() method.

    navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(createNewCategory))
Will this work? (you likely need to add `@objc` annotation to createNewCategory() method. ```suggestion navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(createNewCategory)) ```
biodranik commented 2023-03-09 13:41:56 +00:00 (Migrated from github.com)
Review

Did you test it?

Did you test it?
biodranik commented 2023-03-10 06:39:10 +00:00 (Migrated from github.com)
Review

@pravalgautam do you see these comments?

@pravalgautam do you see these comments?
}
override func viewWillAppear(_ animated: Bool) {