开发者

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 botto开发者_Python百科m, 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)?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜