what having far
andcode:-(void)willanimaterotationtointerfaceorientation:(uiinterfaceorientation)tointerfaceorientation duration:(nstimeinterval)duration { nslog(@"willanimaterotationtointerfaceorientation"); if(tointerfaceorientation == uiinterfaceorientationportraitupsidedown) { nslog(@"portraitupsidedown"); // method } else { [[self.view subviews] makeobjectsperformselector:@selector(removefromsuperview)]; // method b } }
my logic after hitting run xcode, willanimaterotationtointerfaceorientation going called because set supported device orientation upsidedown summary of myapp.xcodeproj.moreover, think didrotatefrominterfaceorientation should not called because have started app yet. means there no previous state @ all.code:- (void)didrotatefrominterfaceorientation:(uiinterfaceorientation)frominterfaceorientation { nslog(@"didrotatefrominterfaceorientation"); if( frominterfaceorientation == uiinterfaceorientationportrait || frominterfaceorientation == uiinterfaceorientationportraitupsidedown) { nslog(@"orientationportrait or portraitupsidedown"); [[self.view subviews] makeobjectsperformselector:@selector(removefromsuperview)]; // method b } else { nslog(@"from else"); [[self.view subviews] makeobjectsperformselector:@selector(removefromsuperview)]; // method } }
unfortunately, got after doing debugger
i getting lost now. have ideas issue, please help. thanks.code:2012-02-11 12:04:08.776 myapp[7505:10703] willanimaterotationtointerfaceorientation : 2012-02-11 12:04:08.776 myapp[7505:10703] portraitupsidedown 2012-02-11 12:04:08.778 myapp[7505:10703] didrotatefrominterfaceorientation : 2012-02-11 12:04:08.779 myapp[7505:10703] orientationportrait or portraitupsidedown
apps start in same interface orientation springboard. on iphone or ipod touch, uiinterfaceorientationportrait. thus, if have device positioned upside down, app starts in portrait , root view controller receives orientation change window becomes visible.
Forums iPhone, iPad, and iPod Touch iOS Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
No comments:
Post a Comment