title: 'CGRectGetWidth' has been replaced by property 'CGRect.width'
body: <p>I'm trying to Test the offset and calculate the current page after scrolling ends.</p>
  
  <p>I just need to update this line to swift 4 ?</p>
  
  <pre><code>let pageWidth: CGFloat = CGRectGetWidth(scrollView.frame)
  </code></pre>
  
  <blockquote>
    <p>'CGRectGetWidth' has been replaced by property 'CGRect.width'</p>
  </blockquote>
  
  <pre><code>  //MARK: UIScrollViewDelegate
      override func scrollViewDidEndDecelerating(_ scrollView: UIScrollView){
         let pageWidth: CGFloat = CGRectGetWidth(scrollView.frame)
          let currentPage:CGFloat = floor((scrollView.contentOffset.x-pageWidth/2)/pageWidth)+1
          // Change the indicator
          pageControl.currentPage = Int(currentPage);
  
      }
  </code></pre>