i have created custom buttons in Xcode 5.In portrait view yellow button will have to display and in landscape mode blue button will have to display.my code is below:
-(BOOL)shouldAutorotate {
UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
if (orientation == UIInterfaceOrientationPortrait) {
[self addYellowBtn1];
}
else if(orientation == UIInterfaceOrientationLandscapeRight)
{
[self addLightBlueBtn2];
}
return YES;
}
when i run this app,at first portrait view displays the yellow button.but when i change into landscape both buttons were displayed.can anyone help me?
assume that this is your
Portrait
method functionalitiesin
LandscapeRight