Is it possible to make the default CGPoint size for an iOS app “bigger”?
For example, the iPhone’s main view is 320 points wide – is it possible to change that to, say, 100 points, and base all calculations on that 100 (as in still be able to use CGRectMake, get sizes etc. normally).
So does anyone know how to subclass UIView in such a way as to make the above work, and, more importantly, would Apple allow it?
Thanks for your time!
Apply a
CGAffineTransformMakeScale(320/100, 320/100)transform to your view so that it is scaled, and 100 points will be scaled to100 * (320/100) = 320points wide.Or course, don’t use magic numbers like above, but use some constant for the value
100and something like[UIScreen mainScreen].applicationFrame.size.width(orview.window.screen.applicationFrame.size.widthor anything similar) to get the width of the screen instead of the value320(because magic numbers are bad, and we never know if the size of the screen will change in any future like the height just changed with iPhone5)