5
Tôi có một UINavigationController
rằng khi sự kiện được kích hoạt, tôi cần một tuỳ chỉnh UIView
để xuất hiện ngay bên dưới NavigationBar
, nhưng không làm cản trở hiện tại ViewController
. Tôi cũng sẽ cần phải làm cho UIView
liên tục khi Bộ điều khiển được bật/đẩy.Thêm chế độ xem tùy chỉnh vào UINavigationController
-----------------
| Status Bar |
-----------------
| Nav Bar |
-----------------
| Custom View |
-----------------
| |
| View Controller |
| |
-----------------
Tôi hiện đang có của tôi CustomView (UIView)
thiết lập khung như:
- (id)initWithNavigationController:(UINavigationController *)navController {
self.navController = navController;
return [self init];
}
- (id)init
{
CGRect viewFrame = self.navController.view.frame;
return [self initWithFrame:CGRectMake(viewFrame.origin.x,
self.navController.navigationBar.frame.origin.y + self.navController.navigationBar.frame.size.height,
viewFrame.size.width,
40.0)];
}
Đây có phải là con đường để đi về điều này?
thử này https://github.com/tursunovic/DMRNotificationView –