Am getting a white space at top in all containers. if I do a model transition that white space is clearly visible on top of all navigation controllers.
that space is around 20px.
How to remove this white space..??
Any suggestion ???
Am getting a white space at top in all containers. if I do a model transition that white space is clearly visible on top of all navigation controllers.
that space is around 20px.
How to remove this white space..??
Any suggestion ???
You didn't really give us enough details in your question, but the most likely cause for your problem is that you are instantiating the subviews programmatically for your viewcontrollers using the viewcontroller's view frame rather than the bounds.
If in your viewDidLoad
method you do something like:
- (void)viewDidLoad
{
[super viewDidLoad];
MyView* myView = [[MyView alloc] initWithFrame:self.view.frame];
[self.view addSubview:myView];
}
then your view will be initialized with an offset of 20px, because your self.view.frame's origin is (0, 20), in order to not overlap with the navigation bar. If you then set your subview's frame with that same origin, it means that the view's origin will be 20 px further translated down (it's not really pixels but points, as the value stays the same whether it's a retina display or not, but whatever).
So, if you want to add a subview that is the size of the view controller's view that is presenting it, then you should always initialize it with:
MyView* myView = [[MyView alloc] initWithFrame:self.view.bounds];
I hope this helps, you didn't give us much to work with in your question, in the future try to give us (many many) more details about what it is that you do, both in the code and in the storyboard.