Reputation: 1099
How can I create a styled button like the one showed below? I know Facebook is using the Three20 framework to generate the buttons programmatically. I think it's overwhelming.
I'm rather new developer of ios so I wonder what is the most common way to create buttons like this? (except for using images).
Upvotes: 3
Views: 3309
Reputation: 2533
Look at related questions on StackOverflow.
Upvotes: 2
Reputation: 3803
Simple way to create is
To create gradient for back ground use: CAGradientLayer, CAGradientLayer.frame and CAGradientLayer.color
Assign gradient to the button use: AddSublayer, CornerRadius, and MasksToBounds on UIButton.
Upvotes: 3
Reputation:
When I want a button like that I tend to just create it in software such as Photoshop. Then you can just set a UIButton
to have a custom style and setup the image as the button background.
Here is a nice tutorial on creating button in photoshop. Hope this helps.
Upvotes: 0