Can I put a UIButton in a subclassed UIView to create graphics for the UIButton, or is this a problem? What is best approach then?
Can I put a UIButton in a subclassed UIView to create graphics for the
Share
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.
Yes, you can put a UIButton in a subclass of UIView. There are many reasons to do that.
But if your goal is to change what the button’s appearance, then you should create a subclass of
UIButtonand overridedrawRect:.