pch file

//=************************ silence ***
#ifndef SLPrefix_pch
#define SLPrefix_pch

#ifdef __OBJC__

//引入网络工具类
#import <UIImageView+WebCache.h>

/**
 *  通知宏
 */
#define MSLChannelViewModelNotification @"MSLChannelViewModelNotification"
#define MSLJumpNotification @"MSLJumpNotification"
/**
 *  channel cell label text font
 */
#define channelFontN 15
#define channelFontS 18

/**
 *  使用masonry的时候,定义的两个宏,用来省略mas_前缀.
 */
#define MAS_SHORTHAND

#define MAS_SHORTHAND_GLOBALS

/**
 *  masonry的头文件引入写到该注释下面.
 */


/**
 *  主屏幕的宽和高
 */
#define kSCREENWIDTH [UIScreen mainScreen].bounds.size.width
#define kSCREENHEIGHT [UIScreen mainScreen].bounds.size.height



//=****** NSLog宏  ****************** silence ***
#ifdef DEBUG

/**
 *  打印宏,能够输出该log所在的文件,行,时间等信息.
 */
#define NSLog(FORMAT, ...) do{fprintf(stderr, "%s <%s> -> %d :%s\n", [[[[NSDate date] dateByAddingTimeInterval:[[NSTimeZone systemTimeZone] secondsFromGMTForDate:[NSDate date]]].description substringWithRange:NSMakeRange(11, 8)] UTF8String],[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);}while(0)

#else

#define NSLog

#endif

//=************************ silence ***

/**
 *  可以快速打印CGRect,CGSize,CGPoint 等信息.
 */
#define NSLogRect(rect) NSLog(@"%s x:%.4f, y:%.4f, w:%.4f, h:%.4f", #rect, rect.origin.x, rect.origin.y, rect.size.width, rect.size.height)

#define NSLogSize(size) NSLog(@"%s w:%.4f, h:%.4f", #size, size.width, size.height)

#define NSLogPoint(point) NSLog(@"%s x:%.4f, y:%.4f", #point, point.x, point.y)

//=************************ silence ***
/**
 *  快速生成RGB颜色
 *
 *  @param R red
 *  @param G green
 *  @param B blue
 */
#define SLRGBColor(R, G, B) [UIColor colorWithRed:(R)/255.0 green:(G)/255.0 blue:(B)/255.0 alpha:1.0]
#define SLPRGBColor(R, G, B) [UIColor colorWithRed:R green:G blue:B alpha:1.0]

//=******   ****************** silence ***

#endif
#endif /* SLPrefix_pch */
//23.41 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值