Create round button in iOS swift


You can create a normal button with width and height as equal.After that in storyboard "show the identity inspector" menu create the runtime attributes.




Add the below attributes when clicking the plus button.layer.CornerRadius set the value as number 25.layer.MasksToBounds set the boolean value as true.if the button width and height is 50 then corner radius will be 25 because if you want the circle icon you must set corner half of its width.





    Comments

    Popular posts from this blog

    Invalid bundle error while upload the app to the app Store

    Convert NsNumber, NSDate to String in iOS Swift

    Global LocationManager Singleton class iOS Swift