Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sigjuice

macrumors member
Original poster
Mar 14, 2008
54
7
I'm having trouble understanding the coordinates of the NSViews inside an NSTabView. To create the extremely simple XIB that I have attached,

- Run Interface Builder and create a new XIB (Cocoa Application Template)
- Set the window's width to 346 and height to 362 in its size inspector
- Place an NSTabView on the window. Resize and position the NSTabView so that it snaps to the blue guides along all the edges of the window.

Here are all the coordinates from all the size inspectors
Content View (0, 0)
Top Tab View (20, 20)
NSView (10, 333)
NSView (10, 333)

I'd appreciate it a lot if I could get some help understanding where the (10, 333) comes from.

Thanks!
 

Attachments

  • Tabs1.xib.zip
    10 KB · Views: 61

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
The view is set as a subview within the tabview, and its origin is (10, 333). 10 px from the left, and 333 from the top (tab views use flipped coordinates). Here's a clearer example:

tabs.png
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.