title: Removing button in swift
body: <p>This is an iOS app. In the PostDetailViewController.swift there is Share Button.</p>
  <p>How can I remove or make the following shareButton invisible? Would it be a healthy way to turn them into comment lines with &quot;//&quot; ? Thanks in advance.</p>
  <pre><code>let shareButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.action, target: self, action: #selector(PostDetailViewController.shareButtonTapped))
          var rightItems = [shareButton]
          if (self.params.count &gt; 2) {
              let commentButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.reply, target: self, action: #selector(PostDetailViewController.showDisqusComments))
              rightItems += [commentButton]
          }
          navigationItem.rightBarButtonItems = rightItems
  
          nameLabel.text = String(htmlEncodedString: post.title!)
  </code></pre>