我有一个希望我在其中的视图中的第三方控制。我正在尝试获得一个UinaVigationController,其中包含一系列表视图,但是当添加控件时,导航栏将TableView重叠大约半行,看起来愚蠢。

这是代码。我正在使用ArcGIS Server IOS SDK将导航控制器放在地图上的标注框中:

    IdentifyResultsViewController *idWindow = [[IdentifyResultsViewController alloc] init];
    idWindow.results = results;
    UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:idWindow];
    map.callout.customView = nvc.view;
    nvc.view.frame = CGRectMake(0, 0, 275, 400);

     [map showCalloutAtPoint:self.mapPoint];
.

这是使用uinavigationViewController的常见问题,还是我应该向第三方控制?

有帮助吗?

解决方案 2

我解决了这个代码的一些简单重新排序 - 而不是使用initwithrootviewController,我创建了导航视图控制器,手动设置它的帧,然后将视图控制器推向它:

    IdentifyResultsViewController *idWindow = [[IdentifyResultsViewController alloc] init];
    idWindow.results = [self filterResults:results];
    UINavigationController *nvc = [[UINavigationController alloc] init];
    nvc.view.frame = CGRectMake(0, 0, 275, 400);
    [nvc pushViewController:idWindow animated:NO];

    map.callout.customView = nvc.view;
    [map showCalloutAtPoint:self.mapPoint];
.

其他提示

我实际上刚刚对阻碍了我的导航栏的第三方控制权才有类似的问题。我试图调查控制,但我并没有足够的能力来取消隐藏导航栏。

我所做的事情也可能是你能做的事情:而不是使用内置的uinavigatigar,我可以通过在页面顶部的UIView中介绍并将自定义按钮添加到执行该功能的情况下我想要在酒吧里。如果您找不到导致问题的内容,这会给您提供一点Wiggle的房间。

希望它有所帮助!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top