iphone - Why is the initial size of UIScrollView still 320 on iPad? -
iphone - Why is the initial size of UIScrollView still 320 on iPad? -
we have xib designed iphone. porting app ipad.
we using paged portion of uiscrollview. have autoresizing masks set width , height. on initial load ipad frame width 320, of course of study makes ui bad.
what's odd if rotate device, "picks" new size based on ipad screen width. right point forward.
do need initialize frame width?
did check box said "targeted ipad" when create xib?
if not, have manually edit xib (or recreate again)
you need 2 different xibs same controller. instantiate them this.
myscrollviewcontroller *controller; if(ui_user_interface_idiom() == uiuserinterfaceidiomphone) { // iphone related code controller = [[myscrollviewcontroller alloc] initwithnibname:@"myscrollviewcontroller" bundle:nil]; } else { // ipad related code controller = [[myscrollviewcontroller alloc] initwithnibname:@"myscrollviewcontroller_ipad" bundle:nil]; } [self presentmodalviewcontroller:controller animated:no]; [controller release]; iphone uiscrollview
Comments
Post a Comment