1.//狀態(tài)欄及背景 ?當(dāng)一個(gè)頁面需要navigation的樣子 卻又不要navigation時(shí) 可以這樣加一個(gè)view,注意是從0開始
UIView * statusBarBgView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 64)];
statusBarBgView.backgroundColor = REDCOLOR;
[self.navigationController.view addSubview:statusBarBgView];

2.xib拖的UiScrollView,不能禁止上下,或者左右滑動(dòng),在如下地方設(shè)置

在代碼中在配合bgScrollView.contentSize = CGSizeMake(你要的寬度, 0);
就可以禁止上下滾動(dòng)了
3.使用UIAlertController
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"請(qǐng)選擇" message:@"" preferredStyle: UIAlertControllerStyleActionSheet];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
UIAlertAction *photographAction = [UIAlertAction actionWithTitle:@"拍照" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[self takePhoto];
}];
UIAlertAction *albumAction = [UIAlertAction actionWithTitle:@"去相冊(cè)選擇" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[self pushImagePickerController];
}];
[alertController addAction:cancelAction];
[alertController addAction:photographAction];
[alertController addAction:albumAction];
[self presentViewController:alertController animated:YES completion:nil];