Get the degree angle from View iOS swift || Drawn object degree angle calculation iOS

 Solution:

The below method is used to calculate the degree from the drawn object.


      let radians = atan2f(Float(view!.transform.b), Float(view!.transform.a))

      var degrees = radians * Float(180 / Double.pi)

       degrees = degrees >= 0 ? abs(degrees) : 360 + degrees


Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

store cgpoint in userdefaults iOS swift