• 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
Why does my custom view grow in the wrong direction?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why does my custom view grow in the wrong direction?


  • Subject: Why does my custom view grow in the wrong direction?
  • From: Tito Ciuro <email@hidden>
  • Date: Tue, 4 Jul 2006 09:01:23 -0700

Hello,

I have a custom NSView that is not behaving the way I expected. I return YES in isFlipped, and when I change the height of the view like this:

- (void)adjustContainerWithNewHeight:(float)newHeight
{
    NSRect containerFrame = [self frame];
    if (newHeight > containerFrame.size.height) {
        containerFrame.size.height = newHeight;
        [self setFrame:containerFrame];
    }
}

the view grows "upward" (the origin moves up), as I would expect if isFlipped == NO. Any other operations, such as placing subviews at a particular point behaves fine, that is, increasing origin.y goes downward.

Why is that? How should I grow the view while honoring its origin?

Thanks,

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


  • Prev by Date: Re: NSMutableArray-can't add objects of my class
  • Next by Date: Re: Changing file & directory names
  • Previous by thread: Re: Embended YouTube video
  • Next by thread: Re: Why does my custom view grow in the wrong direction?
  • Index(es):
    • Date
    • Thread