Is there a software way to get standard sizes in the iPhone SDK

Is there an object or function call that will provide standard sizes for the various user interface elements in the iPhone SDK? In particular, I'm looking for the width of the scroll slot that the Builder interface usually offers to set between controls and the edge of the view.

Windows has a function call called GetSystemMetrics, which provides some of this type of information for Windows. When I look at various iPhone examples on the Internet, I see a lot of hard-coding sizes. I usually don’t like doing something like that.

+5
source share
2 answers

I do not think there is any method that will give you this information. However, as a rule, there are 20 points between controls and the edges of the screen and 8 points between controls (table cells may be different).

The exceptions are UIPicker controls, which extend completely on the iPhone screen and possibly several others.

+1
source

In iOS 5, you can get the appearance proxy object and see what properties it provides. Some may be metrics.

0
source

All Articles