objective-c - ios push页面后 部分控件不会跟着push,大神们知道吗?
天蓬老师
天蓬老师 2017-04-18 09:05:32
0
3
311

就好像iPhone的 Safari浏览器 里面的bookmarks按钮,点进去后,点击tableViewcell,segment不会跟着push,求一些思路!
][2]

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(3)
迷茫

This is because it puts the Segment into the NavigationBar

黄舟

The view is placed on the keywindow

刘奇

The problem has been solved. Thank you for the advice upstairs. It is indeed possible to use keyWindow to prevent push from happening

UISegmentedControl * segment = [[UISegmentedControl alloc]initWithItems:@[@"♞",@"♟",@"♚"]];
segment.frame = CGRectMake(10, 60, SCREEN_WIDTH-20, 30);
[[UIApplication sharedApplication].keyWindow addSubview:segment];

I found out later that it can also be achieved by placing it on the NavigationBar
Add subviews in the custom UIViewController

[self addChildViewController:self.bookmarkVC];
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template