真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

ios6.0和6.0以下橫豎屏幕轉(zhuǎn)換問(wèn)題處理

設(shè)計(jì)師給的需求設(shè)計(jì)上添加了一個(gè)頁(yè)面要橫屏顯示

本以為解決起來(lái)不是問(wèn)題,沒(méi)想到ios5下,這個(gè)問(wèn)題就已經(jīng)是個(gè)問(wèn)題,因?yàn)轫?yè)面設(shè)計(jì)上新頁(yè)面出現(xiàn)是push進(jìn)來(lái)的。
而蘋(píng)果會(huì)讓push進(jìn)來(lái)的頁(yè)面顯示為原來(lái)屏幕的旋轉(zhuǎn)度,這樣會(huì)讓整個(gè)view變形(已經(jīng)說(shuō)不清楚,話(huà)說(shuō)以后有問(wèn)題還是
發(fā)個(gè)博客一步步來(lái)解決比較好,可以隨時(shí)截屏
 
 
 

突然不想說(shuō)了參考了

成都創(chuàng)新互聯(lián)公司專(zhuān)業(yè)為企業(yè)提供哈密網(wǎng)站建設(shè)、哈密做網(wǎng)站、哈密網(wǎng)站設(shè)計(jì)、哈密網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì)與制作、哈密企業(yè)網(wǎng)站模板建站服務(wù),十載哈密做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。

iPhone開(kāi)發(fā)之-橫豎屏 切換push

http://blog.sina.com.cn/s/blog_7cac8562010112ch.html

趕時(shí)間了,不細(xì)細(xì)說(shuō)了

解決方案是:

 

  1. // 
  2. //  MNViewController.m 
  3. //  LeeDemoProject 
  4. // 
  5. //  Created by mobilenow03 on 12-10-29. 
  6. //  Copyright (c) 2012年 mobilenow03. All rights reserved. 
  7. // 
  8.  
  9. #import "SecondVC.h" 
  10. #import  
  11. @interface SecondVC () 
  12.  
  13. @end 
  14.  
  15. @implementation SecondVC 
  16. @synthesize _imgVBackground,_vTransform; 
  17. - (void)dealloc { 
  18.     [_imgVBackground release]; 
  19.     [_vTransform release]; 
  20.     [super dealloc]; 
  21. - (void)viewDidLoad 
  22.     [super viewDidLoad]; 
  23.     // Do any additional setup after loading the view, typically from a nib. 
  24. //    [UIView beginAnimations:nil context:nil]; 
  25. //     
  26. //    [UIView setAnimationDuration:0.3]; 
  27.      
  28.     //設(shè)置導(dǎo)航欄旋轉(zhuǎn) 
  29.      
  30.     self.navigationController.navigationBarHidden = YES; 
  31.      
  32.      
  33.      
  34. - (id)init 
  35.     self = [super init]; 
  36.     if (self) 
  37.     { 
  38.          
  39. //        [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; 
  40. //        [[NSNotificationCenter defaultCenter] addObserver:self 
  41. //                                                 selector:@selector(orientationChanged:) 
  42. //                                                     name:UIDeviceOrientationDidChangeNotification 
  43. //                                                   object:nil]; 
  44.     } 
  45.     return self; 
  46.  
  47.  
  48. -(void)viewDidUnload 
  49.     [self set_vTransform:nil]; 
  50.     [super viewDidUnload]; 
  51.  
  52. -(void)viewWillAppear:(BOOL)animated 
  53.     [super viewWillAppear:animated]; 
  54.     self.view.bounds = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); 
  55.      
  56.     self.view.transform = CGAffineTransformMakeRotation( M_PI*1.5); 
  57. //    if ([[UIDevice currentDevice].systemVersion floatValue] >= 6.0) { 
  58. //        self.view.bounds = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); 
  59. //         
  60. //        self.view.transform = CGAffineTransformMakeRotation(-M_PI*1.5); 
  61. //    }else 
  62. //    { 
  63. //        [[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeRight animated: YES]; 
  64. //        CGFloat duration = [UIApplication sharedApplication].statusBarOrientationAnimationDuration; 
  65. //        [UIView beginAnimations:nil context:nil]; 
  66. //        [UIView setAnimationDuration:duration]; 
  67. //        self.navigationController.view.transform = CGAffineTransformIdentity; 
  68. //        self.navigationController.view.transform = CGAffineTransformMakeRotation(M_PI*(90)/180.0); 
  69. //        self.navigationController.view.bounds = CGRectMake(0, 0, 480, 320); 
  70. //        [UIView commitAnimations];   
  71. //    } 
  72.      
  73. //    [[NSNotificationCenter defaultCenter] postNotificationName:@"OnlyLandscape" object:@"SecondVC"]; 
  74. //    CGFloat angle = 90; 
  75. //    self._vTransform.layer.transform = CATransform3DMakeRotation(angle*M_PI/180.0, 0, 0.0, 1.0); 
  76.     //設(shè)置旋轉(zhuǎn)動(dòng)畫(huà) 
  77.      
  78.      
  79. //    self.navigationController.navigationBar.transform = CGAffineTransformMakeRotation(M_PI*1.5); 
  80. //     
  81. //    //設(shè)置視圖旋轉(zhuǎn) 
  82. //     
  83. //    self.view.bounds = CGRectMake(0, -54, self.view.frame.size.width, self.view.frame.size.height); 
  84. //     
  85. //    self.view.transform = CGAffineTransformMakeRotation(-M_PI*1.5); 
  86. //     
  87. //    [UIView commitAnimations]; 
  88.  
  89. - (void)didReceiveMemoryWarning 
  90.     [super didReceiveMemoryWarning]; 
  91.     // Dispose of any resources that can be recreated. 
  92.  
  93. // 大頭貼的測(cè)試環(huán)境下 
  94. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation 
  95. //    if ((orientation == UIInterfaceOrientationPortrait) || 
  96. //        (orientation == UIInterfaceOrientationLandscapeLeft)) 
  97. //        return YES; 
  98. //    if ((orientation == UIInterfaceOrientationLandscapeRight) || 
  99. //        (orientation == UIInterfaceOrientationLandscapeLeft)) 
  100. //        return YES; 
  101. //    else 
  102.         return NO; 
  103.  
  104.  
  105.  
  106. //-(BOOL)shouldAutorotate 
  107. //{ 
  108. //    return YES; 
  109. //} 
  110. - (IBAction)backBtnClicked:(id)sender { 
  111. //    if ([[UIDevice currentDevice].systemVersion floatValue] >= 6.0) { 
  112. //    }else 
  113. //    { 
  114. //        [[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeRight animated: YES]; 
  115. //        CGFloat duration = [UIApplication sharedApplication].statusBarOrientationAnimationDuration; 
  116. //        [UIView beginAnimations:nil context:nil]; 
  117. //        [UIView setAnimationDuration:duration]; 
  118. //        self.navigationController.view.transform = CGAffineTransformIdentity; 
  119. //        self.navigationController.view.transform = CGAffineTransformMakeRotation(M_PI*(0)/180.0); 
  120. //        self.navigationController.view.bounds = CGRectMake(0, 0, 320, 480); 
  121. //        [UIView commitAnimations]; 
  122. //    } 
  123.     [self.navigationController popToRootViewControllerAnimated:YES]; 
  124.  
  125. //-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation 
  126. //{ 
  127. //    if (fromInterfaceOrientation == UIInterfaceOrientationMaskLandscape) { 
  128. //        NSLog(@"從橫屏"); 
  129. //    }else if (fromInterfaceOrientation == UIInterfaceOrientationMaskPortrait) { 
  130. //        NSLog(@"從肅屏"); 
  131. //    } 
  132. //} 
  133.  
  134. //-(NSUInteger)supportedInterfaceOrientations 
  135. //{ 
  136. //    return UIInterfaceOrientationMaskLandscape; 
  137. //} 
  138.  
  139. //static bool is = NO; 
  140. //- (void)orientationChanged:(NSNotification *)notification 
  141. //{ 
  142. //    UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation; 
  143. //    switch (deviceOrientation) { 
  144. //        case UIDeviceOrientationPortrait: 
  145. //        { 
  146. //             
  147. //        } 
  148. //            break; 
  149. //        case UIDeviceOrientationLandscapeLeft: 
  150. //        { 
  151. //             
  152. //        } 
  153. //            break; 
  154. //        case UIDeviceOrientationPortraitUpsideDown: 
  155. //        { 
  156. //             
  157. //        } 
  158. //            break; 
  159. //        case UIDeviceOrientationLandscapeRight: 
  160. //        { 
  161. //            if (!is) { 
  162. //                //self._imgVBackground.frame = CGRectMake(0, 0, 480, 320); 
  163. ////                self.view.bounds = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); 
  164. //                 
  165. //                self.view.transform = CGAffineTransformMakeRotation(M_PI*0.5); 
  166. //                is = YES; 
  167. //            } 
  168. //             
  169. //        } 
  170. //            break; 
  171. //             
  172. //        default: 
  173. //            break; 
  174. //    } 
  175. //} 
  176.  
  177. //-(void) 
  178. @end 

 


本文標(biāo)題:ios6.0和6.0以下橫豎屏幕轉(zhuǎn)換問(wèn)題處理
當(dāng)前路徑:http://weahome.cn/article/piejgd.html

其他資訊

在線(xiàn)咨詢(xún)

微信咨詢(xún)

電話(huà)咨詢(xún)

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部