Re: Accessor methods in Category
Re: Accessor methods in Category
- Subject: Re: Accessor methods in Category
- From: Alastair Houghton <email@hidden>
- Date: Thu, 6 Aug 2009 14:00:54 +0100
On 6 Aug 2009, at 13:32, Mahaboob wrote:
I subclassed the UIButton class like:
@interface MoveButton : UIButton {
BOOL canMove;
}
@property(readwrite) BOOL canMove;
@end
@implementation MoveButton
@synthesize canMove;
My main class contains a number of UIButton outlets.
How can I use this function with my outlets ?
Perhaps the missing information here is that you need to set the
buttons in question to be of your custom class? You can do this in
Interface Builder by selecting them, then using the Inspector to
change their class to MoveButton. You might also want to change the
type of your outlets to MoveButton *, otherwise you'll need to cast a
lot to avoid warnings.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden