Sunday, 19 August 2012

Loading xib depending on orientation of device whilelaunching the appliction


dear all

have created login screen using ib. , in add-info.plist , in type: "main nib base file name", have written name of xib created using ib.

in application delegate's didfinishlaunchingwithoptions method, writing
code:
[window makekeyandvisible];  return yes
this way, login view (login xib)is loaded start application.but problem launched in portrait mode , there no rotation when simulator/ipad rotated.

query if make 2 xib: 1 portrait mode , other landscape mode, how possible load 1 depending on device orientation.

also, when open xib in ib, in attribute inspector, orientation of xib seen in default portrait (in orientation field) , unable change disabled.

idea appreciated.
regards
 

err, if use standard code, should rotate itself.

code:
- (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation  {      // return yes supported orientations  	return uiinterfaceorientationislandscape(interfaceorientation);  }
but i'm not 100% sure how tackle want, know there delegate method like, "willrotate" or something, can load stuff want depending on orientation, not that. create own methods, , place stuff need when rotate hapen
 


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