Ios ';完成';UINAVIGATIONBABUTTONITEM右侧切断
我使用的是一种uibarbuttonim,结果如下: 我正在使用此代码将其添加到导航中Ios ';完成';UINAVIGATIONBABUTTONITEM右侧切断,ios,objective-c,uikit,navbar,uinavigationitem,Ios,Objective C,Uikit,Navbar,Uinavigationitem,我使用的是一种uibarbuttonim,结果如下: 我正在使用此代码将其添加到导航中 self.doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(dismissWebViewController:)]; [self.navigationItem setRightBarButtonItem:self.d
self.doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(dismissWebViewController:)];
[self.navigationItem setRightBarButtonItem:self.doneButton];
我做错了什么 看起来您的导航栏比屏幕大。在你的故事板上查看它。选择导航栏,您必须在元素的开始和结束处看到一个正方形。如果没有,移动它以适合屏幕 作为参考,iphone 6 4.7英寸应用程序的导航栏宽度为375
此外,请检查是否正确设置了约束。查看您的导航栏“与最近邻的间距”为0表示顶部,为-16表示左侧和右侧。您是否尝试在导航栏中拖放UIBarButton项,稍后设置其值。