【UIKit-125-1】#import <UIKit/UIViewController.h>
来源:互联网 发布:最美乡村网络评选活动 编辑:程序博客网 时间:2024/05/23 15:39
UIKIT_EXTERN NSString *const UIViewControllerShowDetailTargetDidChangeNotificationNS_AVAILABLE_IOS(8_0);
interface UIViewController : UIResponder <NSCoding, UIAppearanceContainer, UITraitEnvironment, UIContentContainer>
【视图生命周期】
- (void)loadView; 1
- (void)viewDidLoad; 2
- (void)viewWillAppear:(BOOL)animated; 3
- (void)viewWillLayoutSubviews;4
- (void)viewDidLayoutSubviews;5
- (void)viewDidAppear:(BOOL)animated; 6
- (void)viewWillDisappear:(BOOL)animated;7
- (void)viewDidDisappear:(BOOL)animated; 8
- (void)didReceiveMemoryWarning; 9
- (BOOL)isViewLoaded;判断是否viewloaded
- (void)loadView{ [super loadView]; JLOGSTR(@"loadView"); }- (void)viewDidLoad{ [super viewDidLoad]; JLOGSTR(@"viewDidLoad")}- (void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:YES]; JLOGSTR(@"viewWillAppear")}- (void)viewWillLayoutSubviews{ [super viewWillLayoutSubviews]; JLOGSTR(@"viewWillLayoutSubviews") }- (void)viewDidLayoutSubviews{ [super viewDidLayoutSubviews]; JLOGSTR(@"viewDidLayoutSubviews") }- (void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:YES]; JLOGSTR(@"viewDidAppear")}- (void)viewWillDisappear:(BOOL)animated{ [super viewWillDisappear:YES]; JLOGSTR(@"viewWillDisappear")}- (void)viewDidDisappear:(BOOL)animated{ [super viewDidDisappear:YES]; JLOGSTR(@"viewDidDisappear")}- (void)didReceiveMemoryWarning{ [super didReceiveMemoryWarning]; JLOGSTR(@"didReceiveMemoryWarning")}
@property(nonatomic,copy) NSString *title; //控制器取个名字
@property(nonatomic,retain) UIView *view; //self.view超常用
【xib storyboard相关】
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil;
@property(nonatomic,readonly, copy)NSString *nibName;
@property(nonatomic,readonly, retain)NSBundle *nibBundle;
@property(nonatomic, readonly, retain) UIStoryboard *storyboard;
- (void)performSegueWithIdentifier:(NSString *)identifier sender:(id)senderNS_AVAILABLE_IOS(5_0);
- (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)senderNS_AVAILABLE_IOS(6_0);
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)senderNS_AVAILABLE_IOS(5_0);
- (BOOL)canPerformUnwindSegueAction:(SEL)action fromViewController:(UIViewController *)fromViewController withSender:(id)senderNS_AVAILABLE_IOS(6_0);
- (UIViewController *)viewControllerForUnwindSegueAction:(SEL)action fromViewController:(UIViewController *)fromViewController withSender:(id)senderNS_AVAILABLE_IOS(6_0);
- (UIStoryboardSegue *)segueForUnwindingToViewController:(UIViewController *)toViewController fromViewController:(UIViewController *)fromViewController identifier:(NSString *)identifier NS_AVAILABLE_IOS(6_0);
@property(nonatomic,readonly)UIViewController *parentViewController;
@property(nonatomic,readonly)UIViewController *presentedViewController NS_AVAILABLE_IOS(5_0);
@property(nonatomic,readonly)UIViewController *presentingViewController NS_AVAILABLE_IOS(5_0);
@property(nonatomic,assign)BOOL definesPresentationContext NS_AVAILABLE_IOS(5_0);
@property(nonatomic,assign)BOOL providesPresentationContextTransitionStyleNS_AVAILABLE_IOS(5_0);
- (BOOL)isBeingPresented NS_AVAILABLE_IOS(5_0);
- (BOOL)isBeingDismissed NS_AVAILABLE_IOS(5_0);
- (BOOL)isMovingToParentViewController NS_AVAILABLE_IOS(5_0);
- (BOOL)isMovingFromParentViewController NS_AVAILABLE_IOS(5_0);
【弹出视图控制器】
- (void)presentViewController:(UIViewController *)viewControllerToPresent animated: (BOOL)flag completion:(void (^)(void))completionNS_AVAILABLE_IOS(5_0);
- (void)dismissViewControllerAnimated: (BOOL)flag completion: (void (^)(void))completionNS_AVAILABLE_IOS(5_0);
@property(nonatomic,assign)UIModalTransitionStyle modalTransitionStyle NS_AVAILABLE_IOS(3_0);
@property(nonatomic,assign)UIModalPresentationStyle modalPresentationStyleNS_AVAILABLE_IOS(3_2);//ipad有效
@property(nonatomic,assign)BOOL modalPresentationCapturesStatusBarAppearanceNS_AVAILABLE_IOS(7_0);//同上
- (BOOL)disablesAutomaticKeyboardDismissal NS_AVAILABLE_IOS(4_3);
NewViewController *nVC = [[NewViewController alloc]init]; // nVC.modalTransitionStyle = UIModalTransitionStyleCoverVertical; nVC.modalPresentationCapturesStatusBarAppearance = YES; nVC.modalPresentationStyle = UIModalPresentationPopover; [self presentViewController:nVC animated:YES completion:^{ NSLog(@"go"); }]; /* typedef NS_ENUM(NSInteger, UIModalTransitionStyle) { UIModalTransitionStyleCoverVertical = 0, UIModalTransitionStyleFlipHorizontal, UIModalTransitionStyleCrossDissolve, UIModalTransitionStylePartialCurl NS_ENUM_AVAILABLE_IOS(3_2), }; typedef NS_ENUM(NSInteger, UIModalPresentationStyle) { UIModalPresentationFullScreen = 0, UIModalPresentationPageSheet NS_ENUM_AVAILABLE_IOS(3_2), UIModalPresentationFormSheet NS_ENUM_AVAILABLE_IOS(3_2), UIModalPresentationCurrentContext NS_ENUM_AVAILABLE_IOS(3_2), UIModalPresentationCustom NS_ENUM_AVAILABLE_IOS(7_0), UIModalPresentationOverFullScreen NS_ENUM_AVAILABLE_IOS(8_0), UIModalPresentationOverCurrentContext NS_ENUM_AVAILABLE_IOS(8_0), UIModalPresentationPopover NS_ENUM_AVAILABLE_IOS(8_0), UIModalPresentationNone NS_ENUM_AVAILABLE_IOS(7_0) = -1, }; */ [self dismissViewControllerAnimated:YES completion:^{ NSLog(@"miss"); }];
【整个view的范围】
@property(nonatomic,assign)UIRectEdge edgesForExtendedLayout NS_AVAILABLE_IOS(7_0); //是否渗透到bar
@property(nonatomic,assign)BOOL extendedLayoutIncludesOpaqueBars NS_AVAILABLE_IOS(7_0); //是否渗透到状态栏
@property(nonatomic,assign)BOOL automaticallyAdjustsScrollViewInsets NS_AVAILABLE_IOS(7_0); //对于滚动视图设置NO有奇效。(滚动从bar之外开始,二又渗透到bar下面)
self.edgesForExtendedLayout = UIRectEdgeTop;//到顶部,无视navigationBar,从(0.0)开始,不选top的会行44开始 self.extendedLayoutIncludesOpaqueBars = NO; self.automaticallyAdjustsScrollViewInsets = NO; /* typedef NS_OPTIONS(NSUInteger, UIRectEdge) { UIRectEdgeNone = 0, UIRectEdgeTop = 1 << 0, UIRectEdgeLeft = 1 << 1, UIRectEdgeBottom = 1 << 2, UIRectEdgeRight = 1 << 3, UIRectEdgeAll = UIRectEdgeTop | UIRectEdgeLeft | UIRectEdgeBottom | UIRectEdgeRight } NS_ENUM_AVAILABLE_IOS(7_0); */
@property (nonatomic)CGSize preferredContentSize NS_AVAILABLE_IOS(7_0);pad
- (UIStatusBarStyle)preferredStatusBarStyle NS_AVAILABLE_IOS(7_0); //设置重载样式
- (UIStatusBarAnimation)preferredStatusBarUpdateAnimationNS_AVAILABLE_IOS(7_0);//设置重载动画
- (void)setNeedsStatusBarAppearanceUpdate NS_AVAILABLE_IOS(7_0);//执行改变。
//plist中 View controller-based status bar appearance -- NO; [[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleLightContent animated:YES]; [self setNeedsStatusBarAppearanceUpdate];//在VC中,执行改变状态栏
@end
xx
- 【UIKit-125-1】#import <UIKit/UIViewController.h>
- 【UIKit-125-2】#import <UIKit/UIViewController.h>
- 【UIKit-125-3】#import <UIKit/UIViewController.h>
- 【UIKit-125-4】#import <UIKit/UIViewController.h>
- 【UIKit-125-6】#import <UIKit/UIViewController.h>
- 【UIKit-125-7】#import <UIKit/UIViewController.h>
- 【UIKit-125-8】#import <UIKit/UIViewController.h>
- 【UIKit-125-9】#import <UIKit/UIViewController.h>
- 【UIKit-124-1】#import <UIKit/UIView.h>
- 【UIKit-93-1】#import <UIKit/UIScrollView.h>
- 【UIKit-110-1】#import <UIKit/UITableView.h> 基础创建
- 【UIKit-65-1】#import <UIKit/UINavigationController.h>UINavgationVC基础
- 【UIKit-124-2】#import <UIKit/UIView.h>
- 【UIKit-124-3】#import <UIKit/UIView.h>
- 【UIKit-124-4】#import <UIKit/UIView.h>
- 【UIKit-124-5】#import <UIKit/UIView.h>
- 【UIKit-124-6】#import <UIKit/UIView.h>
- 【UIKit-124-7】#import <UIKit/UIView.h>
- C++试题
- 【前端学习]】javascript数组(Array)
- app 状态解释 & push执行情况
- Java面向对象之内部类
- 派生类的构造函数及析构函数
- 【UIKit-125-1】#import <UIKit/UIViewController.h>
- 使用Serializable和Parcelable实现在activity之间的传输
- 【Android】 从头搭建视频播放器(5)——将所有放在一起
- 递归穷举数独终盘
- BroadCast
- Linux-CentOS 安装yasm
- Java学习目录(初级篇)
- Count Color(线段树+位运算)
- 【UIKit-125-2】#import <UIKit/UIViewController.h>