Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a programatic way to get standard dimensions in the IPhone SDK

Is there an object or function call that will provide standard dimensions for various user interface elements in the iPhone SDK? Specifically I'm looking for the width of the whitespace gutter the Interface Builder normally recommends you put get between controls and the edge of a view.

In windows there is a function call called GetSystemMetrics that supplies some of this type of information for Windows. When looking at the various iPhone examples around the web I see a lot of hard coding of dimensions. I generally don't like to do things that way.

like image 569
Gryphon Avatar asked Nov 15 '22 10:11

Gryphon


1 Answers

I don't think there is any method that will give you this information. As a general rule, however, 20 points between controls and screen edges and 8 points between controls (table view cells may be different though).

Exceptions to this are UIPicker controls which extend all the way across the iPhone screen, and possibly a few others.

like image 188
TigerCoding Avatar answered Nov 23 '22 23:11

TigerCoding