• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessor methods in Category
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Accessor methods in Category
      • From: Alastair Houghton <email@hidden>
    • Re: Accessor methods in Category
      • From: Graham Cox <email@hidden>
References: 
 >Re: Accessor methods in Category (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Accessor methods in Category
  • Next by Date: Re: Accessor methods in Category
  • Previous by thread: Re: Accessor methods in Category
  • Next by thread: Re: Accessor methods in Category
  • Index(es):
    • Date
    • Thread