先看看要跳转到的页面
下面是主页面,点击Peripheral的时候就会跳转到上面的页面
直接跳转的时候,出现的问题就是导航栏的页面,把上面添加的按钮(Start Peripheral 和 Update Characteristic)给挡住了
如下图
然后看了一下原因,我们在Peripheral的ViewController的M文件的viewDidLoad中添加以下代码
if([[[UIDevice currentDevice]systemVersion]floatValue]>7.0){
self.edgesForExtendedLayout = UIRectEdgeNone;
}
然后成了以下的样式,出现了导航栏异常的问题
然后更改了导航栏的透明度之后就可以啦,我们将上面的代码改为下面这个
if([[[UIDevice currentDevice]systemVersion]floatValue]>7.0){
[self.navigationController.navigationBar setTranslucent:NO];
self.edgesForExtendedLayout = UIRectEdgeNone;
}
我们再看的时候就变得正常了
不知道还有没有其他的解决方法,这个暂时解决了希望对大家有用