UIButton * test=[[UIButton alloc] initWithFrame:CGRectMake(30, 30, 49, 49)];
test.buttonType= UIButtonTypeCustom;
-> assinging to property with ‘readonly’ **attribute not a allow
why? how??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should use the class method
to create the button. After that, set the frame.
From the UIButton Class Reference:
This means that you cannot change the
buttonTypeonce the button as been created.For example, you can do