Tuesday, 18 January 2011

How to create a dialog like Twitter in programming?


i want create universal dialog both iphone/ipad in programming easily?
give me suggestion?
 

attached files:

you'd have make sure app universal (of course) , how load credits modal dialog...

code:
      bool deviceispad = (ui_user_interface_idiom() != uiuserinterfaceidiomphone);            appcredits *appcredits = nil;            if (deviceispad) {          appcredits = [[appcredits alloc] initwithnibname:@"appcredits_ipad" bundle:nil];          [appcredits setmodalpresentationstyle:uimodalpresentationformsheet];      } else {          appcredits = [[appcredits alloc] initwithnibname:@"appcredits_iphone" bundle:nil];      }            [self presentmodalviewcontroller:appcredits animated:yes];  
this shows modal view full screen on iphone , in smaller presentation form sheet on ipad.

hope helps!
 


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