objective c - Specify Landscape image for resource iOS -
when create new imagese in xcode see following screen
now want specify separate image ipad landscape , ipad portrait, there no such option available.
offcourse
-(void)didrotatefrominterfaceorientation:(uiinterfaceorientation)frominterfaceorientation { if((self.interfaceorientation == uideviceorientationlandscapeleft) || (self.interfaceorientation == uideviceorientationlandscaperight)){ myimageview.image = [uiimage imagenamed:@"image-landscape.png"]; } else if((self.interfaceorientation == uideviceorientationportrait) || (self.interfaceorientation == uideviceorientationportraitupsidedown)){ myimageview.image = [uiimage imagenamed:@"image-portrait.png"]; } }
but want know if there exist solution inside interface builder or not?
no there isn't.
since xcode 6 version can use size classes image assets specify particular resource.
unfortunately, ipad uses same size classes (regular-regular) both orientations. can programmatically asking status bar orientation , load asset need.
Comments
Post a Comment