Add programmatically clickable Button with custom Views layouted in InterfaceBuilder

Posted by allisone on Stack Overflow See other posts from Stack Overflow or by allisone
Published on 2010-04-15T01:14:15Z Indexed on 2010/04/15 2:33 UTC
Read the original article Hit count: 260

I have a UIScrollView. In there I add buttons programmatically. Right now I just use UIButton and set one title. But I need to have an UIImage View in there, that will change upon certain events, Text that will change too etc. and I would like to style that in Interface Builder, but I can't figure out how to do this. Which class should I extend, and what kind of xib should I create and what in there, so that in the end I can make the right connections and so that I can listen for UIControlEventTouchDown of that Button.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uibutton