I am developing a UI for my application and need some content in UIScrollView in the middle of the page. I have a UIView (a) set in the main view. Something like this

I have another UIView in the same xib with uiscrollview in that UIView(b) like:

Now when I set the following:
[a addSubview:b];
the UIView a does something like:

Please help me out with this.