title: swift uitoolbar not showing all of the buttons?
body: <p>In my code, I create a for loop which creates a uibarbuttonitem for all 17 items in my array like this.
  my array is </p>
  
  <pre><code>let musicalnotes = ["C", "C♯", "D", "D♯", "E", "F", "F♯", "G", "G♯", "A", "A♯", "B", "E♭", "E","G♭", "A♭", "B♭"]
  
  
  func createnotes(){
  
      let spaceButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.flexibleSpace, target: nil, action: nil)
     // toolBar.frame = CGRect(x: toolBar.frame.origin.x, y: toolBar.frame.origin.y, width: toolBar.frame.size.width, height: 900)
      var buttonarray = [UIBarButtonItem]()
      for a in musicalnotes {
          let a = UIBarButtonItem(title: a, style: .plain, target: self, action: #selector(self.addnotetonote(sender:)))
  
          buttonarray.append(a)
      }
      let cancel = UIBarButtonItem(title: "Cancel", style: .plain, target: self, action: #selector(self.revert))
      buttonarray.append(cancel)
      toolBar.isTranslucent = true
      toolBar.items = buttonarray
  </code></pre>
  
  <p>My problem is the toolbar on an iPhone shows the buttons like so:</p>
  
  <p><a href="https://i.stack.imgur.com/K8Km2.png" rel="nofollow noreferrer">iphone example</a></p>
  
  <p>On an iPhone, the buttons are not visible but functioning, but on an iPad it's normal.</p>
  
  <p>Is it because there are too many buttons to fit on the toolbar or something else?</p>