Re: Accessor methods in Category
Re: Accessor methods in Category
- Subject: Re: Accessor methods in Category
- From: Mahaboob <email@hidden>
- Date: Thu, 06 Aug 2009 18:02:38 +0530
- Thread-topic: Accessor methods in Category
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 ?
On 8/6/09 5:49 PM, "Graham Cox" <email@hidden> wrote:
>
> On 06/08/2009, at 10:11 PM, Mahaboob wrote:
>
>> Is it possible to use accessor methods in category?
>> I need to add one for UIButton class.
>> How can I do it?
>
>
> You can add any methods in a category. What you can't add are
> additional ivars, so if the base class doesn't have the ivar you need,
> you're out of luck. You need to subclass to add ivars.
>
> --Graham
>
>
_______________________________________________
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