1. 程式人生 > >iOS 如何設定一整張圖片作為背景圖片(穿透導航欄)

iOS 如何設定一整張圖片作為背景圖片(穿透導航欄)

#pragma mark -推出另外一個控制器的邏輯控制 - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated { //設定所有介面的背景圖片 UIImageView * backImageView = [UIImageView ff_imageViewWithImageName:@"Rectangle 363"]; [viewController.view insertSubview:backImageView atIndex:0]; [backImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.edges
.equalTo(viewController.view); }]; if (self.childViewControllers.count > 0) { // 設定返回按鈕 viewController.navigationItem.leftBarButtonItem = [UIBarButtonItem ff_barButtonWithTitle:@"" imageName:@"Chevron" target:self action:@selector(goBack)]; } [super pushViewController:viewController animated:animated]; }