5
我有一個UINavigationController
,當事件被觸發時,我需要一個定製UIView
出現只是NavigationBar
下方,但不妨礙當前ViewController
。我還需要在彈出/推送控制器時使UIView
保持不變。添加自定義視圖的UINavigationController
-----------------
| Status Bar |
-----------------
| Nav Bar |
-----------------
| Custom View |
-----------------
| |
| View Controller |
| |
-----------------
我目前有我CustomView (UIView)
設置類似於框架:
- (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)];
}
這是去了解這個問題的方法?
試試這個https://github.com/tursunovic/DMRNotificationView –