• 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
Memory question when added a view to the superView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Memory question when added a view to the superView


  • Subject: Memory question when added a view to the superView
  • From: Philip Vallone <email@hidden>
  • Date: Fri, 10 Sep 2010 15:57:55 -0400

Hi,

If I create a view and add it to my superview, am I no longer the owner and do not have to release it?

    PinDetailsView *detailsView= [[PinDetailsView alloc] initWithFrame:CGRectMake(0, 0, 270, 420)];
    detailsView.backgroundColor = [UIColor whiteColor];

    CGRect frame = detailsView.frame;
    frame.origin = CGPointMake(25, self.view.bounds.size.height);
    detailsView.frame = frame;
    [self.view addSubview:detailsView];

    [UIView beginAnimations:@"presentWithSuperview" context:nil];
    frame.origin = CGPointMake(25,  self.view.bounds.size.height - detailsView.bounds.size.height);

    detailsView.frame = frame;
    [UIView commitAnimations];

Thanks,

Phil

_______________________________________________

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

  • Follow-Ups:
    • Re: Memory question when added a view to the superView
      • From: Dave Carrigan <email@hidden>
  • Prev by Date: Re: Handling Connection Timeouts with NSStream
  • Next by Date: Re: Memory question when added a view to the superView
  • Previous by thread: Re: How to make template images?
  • Next by thread: Re: Memory question when added a view to the superView
  • Index(es):
    • Date
    • Thread