{"id":4740,"date":"2014-03-30T15:02:40","date_gmt":"2014-03-30T15:02:40","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/problem-about-auto-rotation-collection-of-common-programming-errors\/"},"modified":"2014-03-30T15:02:40","modified_gmt":"2014-03-30T15:02:40","slug":"problem-about-auto-rotation-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/problem-about-auto-rotation-collection-of-common-programming-errors\/","title":{"rendered":"problem about auto-rotation-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/da5a954590419be46936868a5c54f343?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMax MacLeod<br \/>\nios iphone autolayout device-orientation auto-rotation<br \/>\nI am developing an application which supports portrait and landscape modes. I am using auto layout to arrange my views. As i have been reading many posts and i have realized that developers commonly use one among the following approaches.1. First approach:Implement the UIViewController::update constraints method and update constraints according to device orientation.2. Second approach:Implement the UIViewController::viewWillLayoutSubviews method and update constraints according to device orienta<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/65cf49408fa40e5d31846ce067ec7caf?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nKurt Horimoto<br \/>\nios6 auto-rotation<br \/>\nI&#8217;m developing for an app with only one view controller visible at this time. If I rotate the device a lot, eventually the private runtime methods that take care of autorotation aren&#8217;t getting invoked. I tried setting breakpoints in the code to track down why this is occurring, but so far I haven&#8217;t had much luck. Since the application begins ignoring interaction events when the rotation occurs, this means that the interaction events are never handled after rotation (I&#8217;m assuming that the same<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/52945e37ff09fb6f46fbd224d4e0f50e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGoppinath<br \/>\nios crash auto-rotation<br \/>\nI am getting abnormal termination (crash) with the App which I am working with when I am changing the device orientation. I am unable to reproduce it so often (it&#8217;s not happening always when I am rotating, let&#8217;s say the chance would be some where around 0.01%), but it&#8217;s a serious problem. I am attaching an important part of a crash report.Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x6563616e Crashed Thread: 0Thread 0 name: Dispatch queue: com.apple.main<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a88c8ff54c6ad8e350e4da536b77d4d7?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRyan Gittings<br \/>\nobjective-c ios6 auto-rotation<br \/>\nhaving some issues with ECSlidingViewController and iOS6, it&#8217;s causing some autorotation problems. To get autorotation working in iOS6, i need to add:[self.window setRootViewController:_topViewController];This then enables autorotation methods, to allow me to enable certain rotations. I am using ECSlidingViewController and in there class, they add a view as such: [self.view addSubview: _topViewController.view];How can i make autorotation work with iOS6, and ECSlidingViewController? I added the f<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/dddeb54e8fd087d5dc66349176dd76f4?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRahul Vyas<br \/>\niphone ios6.1 auto-rotation<br \/>\nI&#8217;m Using this category for supporting Auto rotation in ios 6@implementation UINavigationController (RotationIn_IOS6)-(BOOL)shouldAutorotate {NSLog(@&#8221;Last Object is %@&#8221;,[[self.viewControllers lastObject] description]);return [[self.viewControllers lastObject] shouldAutorotate]; }-(NSUInteger)supportedInterfaceOrientations {return [[self.viewControllers lastObject] supportedInterfaceOrientations]; }- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {return [[self.viewControlle<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Max MacLeod ios iphone autolayout device-orientation auto-rotation I am developing an application which supports portrait and landscape modes. I am using auto layout to arrange my views. As i have been reading many posts and i have realized that developers commonly use one among the following approaches.1. First approach:Implement the UIViewController::update constraints method and update [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4740","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4740"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4740\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}