Re: UIDatePicker in landscape - displaying items moving into position weirdness
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