tag:blogger.com,1999:blog-1763694045679082935.post7158258552128395893..comments2023-04-05T17:20:54.470+05:30Comments on dhilipsiva: iOS 6 UI Interface Orientation - shouldAutorotateToInterfaceOrientation: Not WorkingAnonymoushttp://www.blogger.com/profile/15570221756054497515noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-1763694045679082935.post-91790065287200092122012-11-22T03:36:25.753+05:302012-11-22T03:36:25.753+05:30Hi I am completely stuck with this could you give ...Hi I am completely stuck with this could you give me any idea why I am not able to fix this orientation problem?<br /><br />// Override to allow orientations other than the default portrait orientation.<br />- (BOOL)shouldAutorotate:(UIInterfaceOrientation)interfaceOrientation {<br /> HDAppDelegate *appDelegate = (HDAppDelegate *) [[UIApplication sharedApplication] delegate];<br /><br /> CGAffineTransform transform;<br /><br /> switch (interfaceOrientation)<br /> {<br /> case UIInterfaceOrientationLandscapeLeft:<br /> isInvertedLandscape = NO;<br /> transform = CGAffineTransformMakeRotation(-M_PI);<br /> [[appDelegate mainBackground1] setTransform:transform];<br /> [[appDelegate mainBackground2] setTransform:transform];<br /> [[appDelegate mainBackground3] setTransform:transform];<br /> [[appDelegate ivCredits] setTransform:transform];<br /><br /> // cre8ive.park 110817 : Credits Page<br /> transform = CGAffineTransformMakeRotation(-M_PI/2);<br /> [[appDelegate infoButton] setTransform:transform];<br /> [[appDelegate infoButton] setCenter:CGPointMake(728, 50)];<br /> [[appDelegate buttonBack] setTransform:transform];<br /> [[appDelegate buttonBack] setCenter:CGPointMake(20, 955)];<br /><br /> break;<br /> case UIInterfaceOrientationLandscapeRight:<br /> isInvertedLandscape = YES;<br /> transform = CGAffineTransformMakeRotation(0);<br /> [[appDelegate mainBackground1] setTransform:transform];<br /> [[appDelegate mainBackground2] setTransform:transform];<br /> [[appDelegate mainBackground3] setTransform:transform];<br /> [[appDelegate ivCredits] setTransform:transform];<br /><br /> // cre8ive.park 110817 : Credits Page<br /> transform = CGAffineTransformMakeRotation(M_PI/2);<br /> [[appDelegate infoButton] setTransform:transform];<br /> [[appDelegate infoButton] setCenter:CGPointMake(40, 975)];<br /> [[appDelegate buttonBack] setTransform:transform];<br /> [[appDelegate buttonBack] setCenter:CGPointMake(748, 70)];<br /> break;<br /> default:<br /> break;<br /> }<br /> <br />/*<br /> // Flip background image<br /> CGPoint pt = scrollView.contentOffset;<br /> //NSLog(@"scrollViewDidScroll: to %f",pt.x);<br /> CGFloat cx = appDelegate.mainBackground1.center.x;<br /> CGFloat cy = appDelegate.mainBackground1.center.y;<br /> <br /> if(isInvertedLandscape) {<br /> cy = -pt.x/BG_OFFSET_MOVEMENT_RATIO_DIVIDER+780; // cre8ive.park 110122 : Background image offset control<br /> }<br /> else {<br /> cy = pt.x/BG_OFFSET_MOVEMENT_RATIO_DIVIDER+230; // cre8ive.park 110122 : Background image offset control<br /> }<br /> <br /> <br /> appDelegate.mainBackground1.center = CGPointMake(cx, cy);<br /> appDelegate.mainBackground2.center = CGPointMake(cx, cy);<br /> appDelegate.mainBackground3.center = CGPointMake(cx, cy);<br /> <br />*/<br /> <br /> if((interfaceOrientation == UIInterfaceOrientationLandscapeRight) || (interfaceOrientation == UIInterfaceOrientationLandscapeLeft)) <br /> return YES;<br /> else {<br /> return NO;<br /> }<br />}<br /><br />- (void)didReceiveMemoryWarning {<br /> // Releases the view if it doesn't have a superview.<br /> [super didReceiveMemoryWarning];<br /> <br /> // Release any cached data, images, etc that aren't in use.<br />}<br /><br />- (void)viewDidUnload {<br /> // Release any retained subviews of the main view.<br /> // e.g. self.myOutlet = nil;<br />}<br /><br /><br />- (void)dealloc {<br /> [super dealloc];<br />}<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-52239026191722033802012-11-07T04:42:11.183+05:302012-11-07T04:42:11.183+05:30thanks for the help.thanks for the help.Snehnnoreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-46927767625166244882012-11-05T16:35:59.695+05:302012-11-05T16:35:59.695+05:30How can i know the orientation of device so that i...How can i know the orientation of device so that i need to call some methods in landscape??Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-59732075778546372332012-10-20T04:34:35.874+05:302012-10-20T04:34:35.874+05:30I decided to support iOS 6 after some issues with ...I decided to support iOS 6 after some issues with supporting iOS 5 and running iOS 6 on my phone. I used this Stack Overflow answer which is really great: http://stackoverflow.com/a/12505461/1050388 but I'm still seeing a weird quirk. I can't reply on SO because I don't have enough reputation. <br /><br />I blocked all but one VC from turning, but that VC is in the "More" tab. When I navigate to that tab in the "More" list, and turn the VC, it doesn't rotate. When I click "Edit" and move it to the initial 4 tabs, it rotates just fine. How annoying. Anyone have an idea why this is happening?Denzylnoreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-42106724710834795232012-10-10T20:40:45.680+05:302012-10-10T20:40:45.680+05:30Hi,
In my application, with iOs5, I used the stor...Hi,<br /><br />In my application, with iOs5, I used the storyboard with navigation controller.<br />Every views are in portait mode, except one modal view.<br />For this view, I called method : [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];<br /><br />How can I reproduce this approach with iOs 6?<br /><br />Thanksdonniebraskohttps://www.blogger.com/profile/06670499508773209522noreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-31257709810116900782012-10-09T01:15:48.760+05:302012-10-09T01:15:48.760+05:30My code is like this:
- (BOOL)shouldAutorotateToI...My code is like this:<br /><br />- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {<br /> // Overriden to allow any orientation.<br /> if ((interfaceOrientation == UIInterfaceOrientationPortrait ) || (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown )) {<br /> [self performSelector:@selector(setFramesPortrait) withObject:nil afterDelay:0.1];<br /> }<br /> else if ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft ) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight )) {<br /> [self performSelector:@selector(setFramesLandScape) withObject:nil afterDelay:0.1];<br /> }<br /> return YES;<br />}<br /><br />How can i implement this with new method:Rachithttps://www.blogger.com/profile/15297317552933073444noreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-11454472480672178852012-10-08T10:36:56.741+05:302012-10-08T10:36:56.741+05:30I guess that should do the trick. I guess that should do the trick. Anonymoushttps://www.blogger.com/profile/15570221756054497515noreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-48113849841920341232012-10-08T10:36:16.411+05:302012-10-08T10:36:16.411+05:30-(NSUInteger)supportedInterfaceOrientations{
i...-(NSUInteger)supportedInterfaceOrientations{<br /> if (self.bIsShow == TRUE || self.bAlertShow == TRUE){<br /> return UIInterfaceOrientationMaskPortrait;}<br /> else{<br /> return UIInterfaceOrientationMaskAll;<br /> }<br />}Anonymoushttps://www.blogger.com/profile/15570221756054497515noreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-61443685778941311022012-10-08T10:33:04.321+05:302012-10-08T10:33:04.321+05:30Could you please send the code snippet to dhilipsi...Could you please send the code snippet to dhilipsiva@gmail.com ? I ll have a look and let you know.Anonymoushttps://www.blogger.com/profile/15570221756054497515noreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-9685416148593963912012-10-01T23:38:28.333+05:302012-10-01T23:38:28.333+05:30hi,
right now i have developed one project in ios ...hi,<br />right now i have developed one project in ios 5.1 and now i have to convert it into ios 6 with all supported orientation so i just tried your above code but i cannot get orientation so can you guide me more on this ...?<br /><br />ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-27813931711605345182012-10-01T08:01:19.568+05:302012-10-01T08:01:19.568+05:30Hi DhilipSiva Bijju,
my problem is dynamic locking...Hi DhilipSiva Bijju,<br />my problem is dynamic locking rotation.<br /><br />ex:<br />- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation<br />{<br /> //self is a viewcontroller<br /> BOOL result;<br /> if (self.bIsShow == TRUE || self.bAlertShow == TRUE) {<br /> result = NO; // not rotation<br /> }else {<br /> /* my code */<br /> result = YES; // <br /> }<br /> return result;<br />}<br /><br />can you help me?thankscuongproithttps://www.blogger.com/profile/06108298370666009169noreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-30577286796690649622012-09-28T17:15:44.691+05:302012-09-28T17:15:44.691+05:30Thanks a lot! Have just fixed my project.Thanks a lot! Have just fixed my project.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-46850059490374857052012-09-27T00:47:53.468+05:302012-09-27T00:47:53.468+05:30Well, you can mail me to dhilipsiva@gmail.comWell, you can mail me to dhilipsiva@gmail.comAnonymoushttps://www.blogger.com/profile/15570221756054497515noreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-11804605898067653752012-09-26T23:17:44.042+05:302012-09-26T23:17:44.042+05:30Can you correspond with me via e-mail? I have an a...Can you correspond with me via e-mail? I have an app that i'm currently using this code in my AMPViewController.m <br /><br />// Override to allow orientations other than the default portrait orientation.<br /> - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {<br /> // Return YES for supported orientations<br /> if (interfaceOrientation==UIInterfaceOrientationPortrait || interfaceOrientation==UIInterfaceOrientationPortraitUpsideDown || interfaceOrientation==UIInterfaceOrientationLandscapeLeft || interfaceOrientation==UIInterfaceOrientationLandscapeRight)<br /> return YES;<br /> <br /> return NO;<br /> /*return (interfaceOrientation == UIInterfaceOrientationPortrait);*/<br /> }<br /><br />I tried your above code and it still isn't allowing me to rotate?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-83120403119439716772012-09-20T18:40:52.648+05:302012-09-20T18:40:52.648+05:30Confirmed your problem. iOS 5.1.1 calls shouldAuto...Confirmed your problem. iOS 5.1.1 calls shouldAutorotateToInterfaceOrientation at startup. iOS 6 does NOT.Zacknoreply@blogger.comtag:blogger.com,1999:blog-1763694045679082935.post-54394963714706590492012-08-28T13:34:04.214+05:302012-08-28T13:34:04.214+05:30In my app is working at fineIn my app is working at fineAnonymousnoreply@blogger.com