tags:

views:

13

answers:

1

Hi,

I have some view controllers in my project and all have a common layout in upper half of page. I dont want to do same designing and coding again and again for all pages. I want to create a small view which will fit at upper half of screen and just use it on all the view controlller. I m planning to do it using xib. Can someone suggest me how to display a small view inside another.

A: 

You can set your view's size in the interface builder inspector's size tab. And for showing it in upper half, set the subview's frame accordingly after you add it to the main view..

lukya
hi lukya, thanks for replying, can u please tell me how will i set the subview's frame. I mean how will i use that small xib on my main view, also i have buttons on that half xib, i want to call IBAction on that button also. Do i need to use viewcontroller for this???
pankaj