开发者

monotouch problem with PresentModalViewController

开发者 https://www.devze.com 2023-03-28 20:59 出处:网络
I have a problem I cannot figure out how to solve. Basically I\'m trying to show a map as modal view using the PresentModalViewController of a UITableViewController.

I have a problem I cannot figure out how to solve. Basically I'm trying to show a map as modal view using the PresentModalViewController of a UITableViewController.

The table view controller has a custom cell that contains 2 buttons. One of them is "show on map" button. The application has开发者_如何转开发 a tab bar and a navigation bar. When I call PresentModalViewController the map is actually showed (I mean without errors) correctly but my problem is that the top part of the map view goes under the navigation bar and not on top.

the snippet I'm using is this one:

cellController.ItemButton.TouchUpInside += delegate
{
  var map = new MapViewController(item);
  this._tableViewController.PresentModalViewController(map, true);
};

where "this" is type of UITableViewController

Any idea of this behaviour?


I would suggest calling PresentModalViewController on your NavigationController and not on the TableViewController.

0

精彩评论

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