• 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: UIDatePicker in landscape - displaying items moving into position weirdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UIDatePicker in landscape - displaying items moving into position weirdness


  • Subject: Re: UIDatePicker in landscape - displaying items moving into position weirdness
  • From: mmalc Crawford <email@hidden>
  • Date: Fri, 11 Dec 2009 18:13:08 -0800

On Dec 11, 2009, at 1:06 pm, Alex Kac wrote:

> 	if (timeSpanPicker)
> 	{
> 		//remove it
> 		[timeSpanPicker removeFromSuperview];
> 		[timeSpanPicker release];
>
> 		//now add it again
> 		[self createRelativeTriggerTimeSpanPicker];
> 	}
>
I would strongly suggest replacing
	[timeSpanPicker release];
with
	[self setTimeSpanPicker:nil];

This is generally better form for memory management.

Generally direct assignment is discouraged anywhere other than in initialiser methods, so I'd also suggest replacing

     timeSpanPicker = [[UITimeSpanPicker alloc] initWithFrame: CGRectZero];

with something more like:

    UITimeSpanPicker *aTimeSpanPicker = [[UITimeSpanPicker alloc] initWithFrame: CGRectZero];
    self.aTimeSpanPicker = aTimeSpanPicker;

    [aTimeSpanPicker release];


mmalc

_______________________________________________

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: 
 >UIDatePicker in landscape - displaying items moving into position weirdness (From: "Eric E. Dolecki" <email@hidden>)
 >Re: UIDatePicker in landscape - displaying items moving into position weirdness (From: "Eric E. Dolecki" <email@hidden>)
 >Re: UIDatePicker in landscape - displaying items moving into position weirdness (From: Alex Kac <email@hidden>)
 >Re: UIDatePicker in landscape - displaying items moving into position weirdness (From: "Eric E. Dolecki" <email@hidden>)
 >Re: UIDatePicker in landscape - displaying items moving into position weirdness (From: Alex Kac <email@hidden>)

  • Prev by Date: Re: Detaching a thread to save a file?
  • Next by Date: [iPhone] Track for iPhone App Re-Install
  • Previous by thread: Re: UIDatePicker in landscape - displaying items moving into position weirdness
  • Next by thread: Re: UIDatePicker in landscape - displaying items moving into position weirdness
  • Index(es):
    • Date
    • Thread