PDA

View Full Version : UIActionSheet Style buttons in UIView




ddeepali
Jan 7, 2009, 04:04 AM
Hi,

I want to create button in 'UIView' with the same look and feel that is being used in inbuild Stop watch or UIActionSheet for an iPhone Application.

Please guide me.

I have tried to add 'image' , 'background image' to UIButton but not able to achieve anything.

Do I need to use some graphics ????



jnic
Jan 7, 2009, 10:44 AM
I have tried to add 'image' , 'background image' to UIButton but not able to achieve anything.

Adding a background image:

https://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIButton_Class/UIButton/UIButton.html#//apple_ref/occ/instm/UIButton/setBackgroundImage:forState:

[yourButton setBackgroundImage:yourImage forState:UIControlStateNormal];

Options for UIControlState:

https://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIControl_Class/Reference/Reference.html#//apple_ref/doc/constant_group/Control_State