• 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: 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


References: 
 >Re: Accessor methods in Category (From: Mahaboob <email@hidden>)

  • Prev by Date: Re: Accessor methods in Category
  • Next by Date: Re: [iPhone] networking
  • Previous by thread: Re: Accessor methods in Category
  • Next by thread: Change Opacity of Image
  • Index(es):
    • Date
    • Thread