• 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: Confused by memory issue with UIDatePicker
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Confused by memory issue with UIDatePicker


  • Subject: Re: Confused by memory issue with UIDatePicker
  • From: Daniel Wambold <email@hidden>
  • Date: Sun, 16 Jun 2013 20:52:14 -0400

Kyle Sluder <email@hidden> wrote:

> On Sun, Jun 16, 2013, at 05:00 PM, Daniel Wambold wrote:
>> Quincey Morris wrote:
>>>
>>>> I have a UIDatePicker in an .xib file with its File's Owner set to a custom class, MyTimeDatePickerVC. The MyTimeDatePickerVC inherits from UIViewController, and has an IBOutlet attached to the UIDatePicker.
>>>
>>> What does the IBOutlet declaration for the UIDatePicker look like?
>>
>> @interface MyTimeDatePickerVC : UIViewController <UITableViewDelegate,
>> UITableViewDataSource>
>> {
>>    IBOutlet UIDatePicker *myTimeDatePickerUI;
>>
>> The connection is shown in the margin as the circle with a central dot,
>> as expected, and on inspection, it shows it's connected to the
>> MyDateTimePickerVC~iphone's Picker.
>
> From "Managing Nib Objects in iOS", in the Legacy Patterns section of
> the Nib Files chapter of the Resource Programming Guide
> <http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html#//apple_ref/doc/uid/10000051i-CH4-SW19>:
>
> """As it rebuilds the object hierarchy, UIKit reestablishes connections
> between the objects using setValue:forKey:, which uses the available
> setter method or retains the object by default if no setter method is
> available. This means that (assuming you follow the pattern shown above)
> any object for which you have an outlet remains valid."""
>
> For this reason, that document recommends you use a weak declared
> property for outlets to non-top-level objects. You should probably
> follow that recommendation.
>
> --Kyle Sluder

Indeed, I should. Thank you for pointing  me to this document, Kyle.

Best regards,
-Dan
_______________________________________________

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: 
 >Confused by memory issue with UIDatePicker (From: Daniel Wambold <email@hidden>)
 >Re: Confused by memory issue with UIDatePicker (From: Quincey Morris <email@hidden>)
 >Re: Confused by memory issue with UIDatePicker (From: Daniel Wambold <email@hidden>)
 >Re: Confused by memory issue with UIDatePicker (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Confused by memory issue with UIDatePicker
  • Next by Date: Re: Confused by memory issue with UIDatePicker
  • Previous by thread: Re: Confused by memory issue with UIDatePicker
  • Next by thread: Re: Confused by memory issue with UIDatePicker
  • Index(es):
    • Date
    • Thread