Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-22-2010, 02:19 AM   #1 (permalink)
you are what you hide.
 
Join Date: Apr 2010
Location: India
Posts: 49
iRanjan is on a distinguished road
Smile UIButton @property (nonatomic, retain) mechanism understanding

Hi Guys,

Can you please tell me does a UIButton instance require the following:

@property (nonatomic, retain) UIButton *btnClick;


Regards
Ranjan
iRanjan is offline   Reply With Quote
Old 04-22-2010, 02:44 AM   #2 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 47
royen is on a distinguished road
Default

By far the best explanation of properties that I have come across is Slick's Definitive Guide To Properties.

The short answer is that it depends on wether btnClick is an instance variable or a local variable. Instance variables are defined in the @interface in the .h-file and I can't think of a case where you wouldn't need a @property declaration. Local variable are defined in the @implementation in the .m-file and can't have property declarations.

So the even shorter answer is probably "Yes."
royen is offline   Reply With Quote
Old 04-22-2010, 02:54 AM   #3 (permalink)
you are what you hide.
 
Join Date: Apr 2010
Location: India
Posts: 49
iRanjan is on a distinguished road
Default

Thanks.

Quote:
Originally Posted by royen View Post
By far the best explanation of properties that I have come across is Slick's Definitive Guide To Properties.

The short answer is that it depends on wether btnClick is an instance variable or a local variable. Instance variables are defined in the @interface in the .h-file and I can't think of a case where you wouldn't need a @property declaration. Local variable are defined in the @implementation in the .m-file and can't have property declarations.

So the even shorter answer is probably "Yes."
iRanjan is offline   Reply With Quote
Old 09-11-2010, 07:03 AM   #4 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 14
Den Policarpio is on a distinguished road
Default

[deleted]

Last edited by Den Policarpio; 09-11-2010 at 07:09 AM.
Den Policarpio is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 316
20 members and 296 guests
baja_yu, cgokey, Domele, Duncan C, Fstuff, gbenna, givensur, guusleijsten, HowEver, iphonedevshani, jbro, JoeRCruso, mdpauley, n00b, newDev, seokwon lee, SLIC, stanny, Steven.C, WheyLabs
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,112
Posts: 402,875
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:33 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0