YasBES
YasBES

Reputation: 2325

Problem Type UIButton

I have two UIButton buttons. I have already initialized the buttons in my xib type add in touch after my program I want to change the type of button:

configImage1=[UIButton buttonWithType:UIButtonTypeDetailDisclosure] ; //doesn't Work !
configImage2=[UIButton buttonWithType:UIButtonTypeDetailDisclosure]; //doesn't Work !

Upvotes: 0

Views: 244

Answers (2)

Jhaliya - Praveen Sharma
Jhaliya - Praveen Sharma

Reputation: 31722

UIButton has the below property but it's readonly, so one can'nt change the button type once it's created,

@property(nonatomic, readonly) UIButtonType buttonType

Try to Create a new UIButton again if you want change in button type ,

Upvotes: 1

ySgPjx
ySgPjx

Reputation: 10265

You can't change the type of the button after you have created it.

Upvotes: 2

Related Questions