iOS Swift 4 Coding

How to use Apple system icons within Swift 4?

1 views August 29, 2018 August 30, 2018 bicobro 0

If you want to use the iOS built-in system icons when, for example, define an UIBarButtonItem. The parameter barButtonSystemItem does the trick.

// We use the built-in system icon "Add" (.add)
UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(myViewController.didTapAddButton))

@objc func didTapAddButton(sender: UIBarButtonItem) {
    // do something



Was this helpful?