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

时间:2012-01-23 14:40:19

标签: iphone objective-c uiinterfaceorientation

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

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

0 个答案:

没有答案