• 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: Which thing should be an IBOutlet?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which thing should be an IBOutlet?


  • Subject: Re: Which thing should be an IBOutlet?
  • From: Geoffrey Goutallier <email@hidden>
  • Date: Tue, 11 Dec 2012 23:28:23 +0100

Hello Steve,

I do not know what is the proper technique to do it. Redundancy is not necessary, so declare IBOutlet either in @interface or in @property, not in both.

Also, and from what I know, @property (and matching @synthesize in .m)  is just a way to implicitly declare accessors to the variable. Knowing that IBOutlets are for connecting variables to XIB elements, they do not necessary require accessors. So I would go (and am going) with the @interface declaration. Plus I find it more legible.

Cheers,

++GG

On Dec 11, 2012, at 22:44, Steve Mills <email@hidden> wrote:

> Which should be the IBOutlet for connecting a control in a nib to its owner class? The instance variable:
>
> @interface Blah
> {
> 	IBOutlet Thing* thing;
> }
>
> @property (assign) Thing* thing;
> @end
>
> Or the property:
>
> @interface Blah
> {
> 	Thing* thing;
> }
>
> @property (assign) IBOutlet Thing* thing;
> @end
>
> Or both:
>
> @interface Blah
> {
> 	IBOutlet Thing* thing;
> }
>
> @property (assign) IBOutlet Thing* thing;
> @end
>
> I've seen examples of the first two.
>
> --
> Steve Mills
> office: 952-818-3871
> home: 952-401-6255
> cell: 612-803-6157
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Which thing should be an IBOutlet? (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Which thing should be an IBOutlet?
  • Next by Date: Re: Xcode stops indenting on new line?
  • Previous by thread: Re: Which thing should be an IBOutlet?
  • Next by thread: Re: Which thing should be an IBOutlet?
  • Index(es):
    • Date
    • Thread