Some common header files in iOS development

Source: Internet
Author: User

Transferred from: http://my.oschina.net/u/1025290/blog/300037

#ifndef ui_definitions#defineUi_definitions#pragmaMark UI-related constants//Navigation Bar Height#defineContent_navigationbar_height 44//Bottom Tabbar Height#defineContent_tabbar_height 49//the height of the keyboard in the English state#defineEngish_keyboard_height 216//Screen Width#defineScreen_width ([[UIScreen mainscreen]bounds].size.width)//Screen Height#defineScreen_height ([[UIScreen mainscreen]bounds].size.height)//Search Box Frame#defineSearch_bar_frame CGRectMake (0,0,screen_width, 44)//iPhone StatusBar Height#definePhone_statusbar_height 20//iPhone screen size, removed status bar height#definePhone_screen_size (Cgsizemake (Screen_width, Screen_height-phone_statusbar_height))//determine if the iphone is a 4-inch screen#defineis_iphone_568 ([[Uidevice currentdevice] userinterfaceidiom] = = Uiuserinterfaceidiomphone && [UIScreen Mainscreen].bounds.size.height = = 568)//suitable for 3.5 inch screen and 4 inch picture name#defineAdapt_image_name (ImageName) (is_iphone_568?) [NSString stringwithformat:@ "%@-568h", [ImageName Stringbydeletingpathextension]]:imagename)//Bold Font#defineBoldlabelfont (fontSize) [Uifont boldsystemfontofsize:fontsize]//Normal Font#defineLabelfont (fontSize) [Uifont systemfontofsize:fontsize]//Add a picture to the bundle file#defineGet_image_from_bundle_path (imagename,bundlename) [Resbundleutils imagenamedfromimagesbundlepng:imagename Withsubpath:bundlename]#endif
Define Code

Some common header files in iOS development

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.