zoukankan      html  css  js  c++  java
  • iOS常用宏定义

    #define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]

    #define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]

     

    #define SCREEN [[UIScreen mainScreen] bounds]

    #define kSpaceX 50

    #define Helvetica @"Helvetica Neue"

    #define HelveticaBold @"Helvetica-Bold"

    #define kDocumentPath [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]

     

    #define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]

    #define RGBACOL OR(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]

     

    #define LineColor RGBCOLOR(204, 204, 204)

     

    #define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue]

     

    #define IsiPhone4s ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)

    #define LINEIMAGECOLOR [UIColor colorWithRed:212.0/255.0 green:212.0/255.0 blue:212.0/255.0 alpha:1]

    #define IsiPhone5s ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)

     

    #define TABBAR_HEIGHT   49.f

    #define TABBAR_TAP_BUTTON_WIDTH  ([UIScreen mainScreen].bounds.size.width/5)

    #define TABBAR_TAP_BUTTON_WIDTH_T  ([UIScreen mainScreen].bounds.size.width/4)

    #define TABCHATBAR_TAP_BUTTON_WIDTH  ([UIScreen mainScreen].bounds.size.width/3)

    #define TABMONEYBAR_TAP_BUTTON_WIDTH  ([UIScreen mainScreen].bounds.size.width/4)

     

    #define NAVBAR_IOS7_HEIGHT (IOS_VERSION>=7.0?64.f:0.f)

     

    #define Map_Height ([UIScreen mainScreen].bounds.size.height-200.f-NAVBAR_IOS7_HEIGHT)

    #define Map_Height_TabBar ([UIScreen mainScreen].bounds.size.height-200.f-TABBAR_HEIGHT-NAVBAR_IOS7_HEIGHT)

     

    #define Iphone_WaitView_Width  100.f

    #define Iphone_WaitView_Height 100.f

    #define KscreenHeigh           [[UIScreen mainScreen] bounds].size.height

    #define KscreenWidth           [[UIScreen mainScreen] bounds].size.width

  • 相关阅读:
    python学习日记(OOP访问限制)
    python学习日记(OOP——@property)
    python学习日记(OOP——静态方法和类方法)
    python学习日记(isinstance和issubclass)
    python学习日记(OOP——反射)
    python学习日记(初识面向对象)
    python学习日记(内置、匿名函数练习题)
    python学习日记(内置函数)
    python学习日记(内置函数补充)
    Raft一致性协议
  • 原文地址:https://www.cnblogs.com/kfgcs/p/6387524.html
Copyright © 2011-2022 走看看