Adding outlets to UIButton

Posted by alltom on Stack Overflow See other posts from Stack Overflow or by alltom
Published on 2010-03-27T09:51:32Z Indexed on 2010/03/27 9:53 UTC
Read the original article Hit count: 289

For quickly mocking up UI, I'd like to be able to drag buttons onto a view in interface builder, then drag a connection from that button to the view that should appear when you click it.

A subclass of UIButton is a little inconvenient to use in IB, so I'd prefer to add the behavior to UIButton itself. Unfortunately, it seems like outlets created in a category aren't visible in IB:

@interface UIButton (myextensions) {
    IBOutlet UIView *outletDestination;
}
@end

Can extra outlets be added this way?

© Stack Overflow or respective owner

Related posts about interface-builder

Related posts about cocoa