iPhone: How to create a UIButton from a xib, or a UIView
Is there some way to make a custom UIButton which apparence inherits from a xib file or a uiview?
In android I can inflate a layout and use it as the view of a button, is this possible in iphone?
I created a class that inherits from UIButton, and tried to create a xib file for it with a view where I could place other开发者_StackOverflow中文版 elements inside and link them to the class. I made this view the type of my class, but it did not seem to work as I expected.
UIButton inherits directly from UIView so yes, you can utilized a customized UIView for a UIButton.
精彩评论