window screen view

 UIProgressviewios7.1缺陷
http://stackoverflow.com/questions/22540200/uiprogressview-custom-images-doesnt-work-in-ios-7-1

关于UIScreen
   
    CGRect screenBounds = [ [UIScreen mainScreen]bounds];//返回的是带有状态栏的Rect
    CGRect appframeBounds = [ [UIScreen mainScreen]applicationFrame];//不包含状态栏的Rect
    CGRect viewFrameBouds = self.view.frame; // origin=(x=0, y=0) size=(width=320, height=4
   无论是ios6,7  
   screenBounds appframe  保持不变
   viewframe ios6 (0 20 320 460)   ios7 (0 0 320 480)

关于程序整个程序window的生命周期
  
     ios7.1以后
     loadview中self.view的frame不在能够修改,但是能够自己创建,只能用自定义的view想要的视图的view的frame
     要想修改self.view的frame需要在 viewDidAppear中修改
    
    执行顺序是

    正常创建的情况下

    NCRTwoViewController *viewController = [[NCRTwoViewControlleralloc]init ];

    [self.navigationControllerpushViewController:viewControlleranimated:YES];


     loadView

    viewDidLoad

    viewWillAppear

    viewDidAppear


异常创建的情况下:

NCRTwoViewController *viewController = [[NCRTwoViewControlleralloc]init ];

    viewController.view.frame =CGRectMake(100,100200200);

    [self.view addSubview:viewController.view];

   

2014-08-24 23:55:58.380 Test[1777:70b] load view

2014-08-24 23:55:58.381 Test[1777:70b] view did load

2014-08-24 23:55:58.382 Test[1777:70b] before addsubview

2014-08-24 23:55:58.382 Test[1777:70b] view will appear

2014-08-24 23:55:58.383 Test[1777:70b] after addsubview

2014-08-24 23:55:58.384 Test[1777:70b] view did appear


   只要调用self.view,系统会自动的调用loadview viewdidload方法,创建好view,以供后续使用


 NCRTwoViewController *viewController = [[NCRTwoViewControlleralloc]init ];

    viewController.view.frame =CGRectMake(100,100, 200, 200);

//    [self.view addSubview:viewController.view];

    [self.navigationControllerpushViewController:viewControlleranimated:YES];

  viewController frame修改失败,仍然是 默认的

你可能感兴趣的:(window screen view)