title: Waved Curved Tabbar Design in swift 4.2 İOS
body: <p>Wave curved (upside) tabbar behind the center raised button. İ have created a customised class for tabbar by using reference of "<a href="https://medium.com/@philipp307/draw-a-custom-ios-tabbar-shape-27d298a7f4fa" rel="nofollow noreferrer">https://medium.com/@philipp307/draw-a-custom-ios-tabbar-shape-27d298a7f4fa</a>" But actually İ need to create a Wave Curved in the center of tab bar. İ have tried to play around with Bézier curve but not getting an exact behind the central button. I don't need a dip of it. İ need it behind (upside wave) my custom code and images attached.</p>
  
  <pre><code>func createPath() -&gt; CGPath {
  
      let height: CGFloat = 37.0
      let path = UIBezierPath()
      let centerWidth = self.frame.width / 2
  
      path.move(to: CGPoint(x: 0, y: 0)) // start top left
      path.addLine(to: CGPoint(x: (centerWidth - height * 2), y: 0)) // the beginning of the trough
  
      // first curve down
      path.addCurve(to: CGPoint(x: centerWidth, y: height),
                    controlPoint1: CGPoint(x: (centerWidth - 30), y: 0), controlPoint2: CGPoint(x: centerWidth - 35, y: height))
      // second curve up
      path.addCurve(to: CGPoint(x: (centerWidth + height * 2), y: 0),
                    controlPoint1: CGPoint(x: centerWidth + 35, y: height), controlPoint2: CGPoint(x: (centerWidth + 30), y: 0))
  
      // complete the rect
      path.addLine(to: CGPoint(x: self.frame.width, y: 0))
      path.addLine(to: CGPoint(x: self.frame.width, y: self.frame.height))
      path.addLine(to: CGPoint(x: 0, y: self.frame.height))
      path.close()
      return path.cgPath
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/CMwI7.png" rel="nofollow noreferrer">tabbar design</a></p>