Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 导航栏按钮在设备定向期间移动几秒钟_Iphone_Objective C_Uiinterfaceorientation - Fatal编程技术网

Iphone 导航栏按钮在设备定向期间移动几秒钟

Iphone 导航栏按钮在设备定向期间移动几秒钟,iphone,objective-c,uiinterfaceorientation,Iphone,Objective C,Uiinterfaceorientation,在我的导航栏中,我有一个左按钮和一个右按钮。在进行设备定位时,这些按钮项目会在几秒钟内朝向标题视图,然后返回到结束位置。此重新定位的任何解决方案。 提前谢谢 UIBarButtonItem *btLeftItem = [[UIBarButtonItem alloc] initWithCustomView:segNav]; [segNav release]; UIBarButtonItem *btRightItem = [[UIBarButtonItem alloc] initWithCusto

在我的导航栏中,我有一个左按钮和一个右按钮。在进行设备定位时,这些按钮项目会在几秒钟内朝向标题视图,然后返回到结束位置。此重新定位的任何解决方案。 提前谢谢

UIBarButtonItem *btLeftItem = [[UIBarButtonItem alloc] initWithCustomView:segNav];
[segNav release];

UIBarButtonItem *btRightItem = [[UIBarButtonItem alloc] initWithCustomView:segRight];
[segRight release];

//segNav and segRight are UISegmentedControl objects

navItem = [[UINavigationItem alloc] init];
[navItem setRightBarButtonItem:btRightItem]; //set left button for navigation item
[navItem setLeftBarButtonItem:btLeftItem];   //set right button for navigation item

[navItem setTitleView:titleLab]; //set navigation item title view

你能分享一下代码吗??。否则很难解决问题