Jack BeNimble
Jack BeNimble

Reputation: 36713

Modal ViewController has white stripe on bottom

I have a ViewController subclass that I'm presenting as a modal view:

MyViewController *myViewController = [[MyViewController alloc] init];
[self presentModalViewController:myViewController animated:YES];

However, the modal view showing up with a white stripe on the bottom, approximately the height of the title or navigation bar. My app is otherwise navigation controlled. How do I get rid of the white stripe (and ideally add a title bar)?

Upvotes: 0

Views: 226

Answers (1)

Jamie Stewart
Jamie Stewart

Reputation: 331

I'm not sure if this is one of two things from your question, are you trying to add a navigation controller to your modal view controller, or are you trying to hide your navigation controller from your modal view. I suspect you may want to in fact change your code to the following to present your modal view controller from your NavigationController

 MyViewController *myViewController = [[MyViewController alloc] init];
[[self navigationController] presentModalViewController:myViewController animated:YES];

Then call setTitle: on you MyViewController object to set the title for it.

Upvotes: 1

Related Questions