tags:

views:

12

answers:

1

hi, I am using ipad Xib file which has 768*1024. but when I reduce its size(through coding as .frame property in viewdidload) in adding subview the width and height is reduced and shown but the object (like button etc) is in the same coordinate as it is in 768 * 1024? i have to do anything in autosizing etc?any tutorial step by step?

+1  A: 

You should check the UIView Class Reference

First of all, your superview should be capable of autoresizesSubviews, it's by default true/active.

And then, on the subviews you should set the way that they will respond to changes on their superview, for this have a look at contentMode.

Overriding the drawRect: method on your UIView allows you to configure the whole drawing process of it.

vfn