Resolved 3.5 to 4 or iphone 4 to 5 .. got to make a living.
- Get link
- X
- Other Apps
hahaa it.. ??? ok never mind..
have app iphone 4 or 3.5 , worked on iphone 5 boarder.. updated full frame , iphone 5 aware if install new recognizes it's on iphone 5 , fine.
if it's old version updated. code doesn't seem working..
but doesn't seem reading correctly. because size seems off.code:#define is_iphone5 (([[uiscreen mainscreen] bounds].size.height-568)?no:yes) #define scaleyfor5 1.19 ; //1.18333333 #define scaleyfor35 1.0; #define scalexfor5 1; #define scalexfor35 1; // else resize buttons // if (is_iphone5) { btframe.origin.y = btframe.origin.y * (scaleyphone+0.05); // 0.04 }else{ btframe.origin.y = btframe.origin.y * scaleyphone; } moveshuf.frame = btframe; cgrect btframer = moverest.frame; btframer.origin.x = btframer.origin.x * scalexphone; if (is_iphone5) { btframer.origin.y = btframer.origin.y * (scaleyphone+0.02); // 0.04 }else{ btframer.origin.y = btframer.origin.y * scaleyphone; } moverest.frame = btframer; // , other stuff resizes it. if (is_iphone5) { btframe.origin.y = btframe.origin.y * (scaleyphone+0.05); // 0.04 }else{ btframe.origin.y = btframe.origin.y * scaleyphone; } }
have check actual models
***also idea how test in simulate upgrades, because simulator , xcode seems compile new app. works fine
should like.
*** hint although both images came iphone 5 different resolutions.
below 496 × 880 pixels above 640 × 1136 pixels wacky.. think iphone5 stretch image not change screen resolutions.
thinking might answer. #1
thanks suggestions.code:#define is_ipad (ui_user_interface_idiom() == uiuserinterfaceidiompad) #define is_iphone (ui_user_interface_idiom() == uiuserinterfaceidiomphone) #define is_iphone_5 (is_iphone && [[uiscreen mainscreen] bounds].size.height == 568.0) #define is_retina ([[uiscreen mainscreen] scale] == 2.0)
ian
bad idea? apple suggest not use why?
code:#import <sys/utsname.h> #define is_iphone5 ((([devicename() rangeofstring:@"iphone5,"].location != nsnotfound)||([devicename() rangeofstring:@"iphone6,"].location != nsnotfound))?no:yes) nsstring* devicename() { struct utsname systeminformation; uname(&systeminformation); nsstring *result = [nsstring stringwithcstring:systeminformation.machine encoding:nsutf8stringencoding]; nslog(@"device a:%@",result); return result; } // when put same code in object gives me duplicate compile error !! ?hun? // * not using above because previous answer #! code works without issue , apple sanctioned... hahah!!! ** think problem initialize / save the screen , never update later.. bad. think best practices sort of thing dynamically calculate these values.. fingers crossed.
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
- Get link
- X
- Other Apps
Comments
Post a Comment