fhone

Learn about fhone, we have the largest and most updated fhone information on alibabacloud.com

Use macro definitions to improve development efficiency in IOS development

retina screen, whether the device is%fhone 5, is an ipad#define Isretina ([UIScreen instancesrespondtoselector: @selector (currentmode)]? Cgsizeequaltosize (Cgsizemake (640, 960), [UIScreen Mainscreen] currentmode].size): NO)#define IPHONE5 ([UIScreen instancesrespondtoselector: @selector (currentmode)]? Cgsizeequaltosize (Cgsizemake (640, 1136), [UIScreen Mainscreen] currentmode].size): NO)#define ISPAD (ui_user_interface_idiom () = = Uiuserinterfac

The macro # define that IOS uses

([[[Uidevice Currentdevice] systemversion] intvalue]==9)#defineISIOS10 ([[[Uidevice Currentdevice] systemversion] intvalue]==10)#defineISIOS11 ([[[Uidevice Currentdevice] systemversion] intvalue]==11)#defineIsAfterIOS4 ([[[Uidevice Currentdevice] systemversion] intvalue]>4)#defineIsAfterIOS5 ([[[Uidevice Currentdevice] systemversion] intvalue]>5)#defineIsAfterIOS6 ([[[Uidevice Currentdevice] systemversion] intvalue]>6)#defineIsAfterIOS7 ([[[Uidevice Currentdevice] systemversion] intvalue]>7)#de

The macro definition of the specification in IOS development, the basic common macro definition organizes the collection. Share to everyone!

] systemversion] intvalue]>4) + #defineIsAfterIOS5 ([[[Uidevice Currentdevice] systemversion] intvalue]>5) - #defineIsAfterIOS6 ([[[Uidevice Currentdevice] systemversion] intvalue]>6) + //get the current language A #defineCurrentlanguage ([[Nslocale preferredlanguages] objectatindex:0]) at - //determine if the retina screen, whether the device is%fhone 5, is an ipad - #defineIsretina ([UIScreen instancesrespondtoselector: @selector (currentmode)]? C

Common macro definitions for IOS

stringwithutf8string:__file__] \LINENUMBER:__LINE__ \DESCRIPTION:__VA_ARGS__]; \} \} while (0)---------------------Print Log------------------------------------------------System----------------------------whether ipad#define ISPAD (ui_user_interface_idiom () = = Uiuserinterfaceidiompad)whether ipad#define SomeThing (ui_user_interface_idiom () = = Uiuserinterfaceidiompad)? Ipad:iphoneGet System version#define Ios_version [[Uidevice Currentdevice] systemversion] floatvalue]#define Currentsystemv

Macro on the tall define # define

diagnostic pop") \} while (0)8. Conversion of angle and radians during circular motion.9.获取屏幕 宽度、高度#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)//----------------------系统---------------------------- // 是否iPad#define isPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)// 是否iPad#define someThing (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)? ipad: iphone//获取系统版本#define IOS_VERSION [[[UIDevice current

Common ios development macros

].size.width#defineAPP_HEIGHT[[UIScreenmainScreen]applicationFrame].size.height// Obtain the system version#defineIOS_VERSION[[[UIDevicecurrentDevice]systemVersion]floatValue]#defineCurrentSystemVersion[[UIDevicecurrentDevice]systemVersion]#defineisIOS4([[[UIDevicecurrentDevice]systemVersion]intValue]==4)#defineisIOS5([[[UIDevicecurrentDevice]systemVersion]intValue]==5)#defineisIOS6([[[UIDevicecurrentDevice]systemVersion]intValue]==6)#defineisAfterIOS4([[[UIDevicecurrentDevice]systemVersion]intV

IOS Common macro Definitions

(ui_user_interface_idiom () = = Uiuserinterfaceidiompad)? Ipad:iphoneGet System version#define Ios_version [[Uidevice Currentdevice] systemversion] floatvalue]#define Currentsystemversion [Uidevice Currentdevice] systemversion]Get the current language#define CURRENTLANGUAGE ([Nslocale preferredlanguages] objectatindex:0])Determine if the retina screen, whether the device is%fhone 5, is an ipad#define Isretina ([UIScreen instancesrespondtoselector: @s

Related Keywords:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.