根据不同的系统走不同的流程 iOS 发布时隐藏NSLog
2015-11-26 19:21
531 查看
//
// ViewController.m
// differentVersions
//
// Created by wusiping on 15/11/21.
// Copyright (c) 2015年 wusiping. All rights reserved.
//
#import "ViewController.h"
#define iOS8 [[UIDevice currentDevice].systemVersion intValue] ==
8
#define iOS7 [[UIDevice currentDevice].systemVersion intValue] ==
7
#define iOS9 [[UIDevice currentDevice].systemVersion intValue] ==
9
// 自定义Log
#ifdef DEBUG
#define NSLog(...) NSLog(__VA_ARGS__)
#else
#define NSLog(...)
#endif
@interface
ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[superviewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
if (iOS8) {
NSLog(@"走流程8");
}else if(iOS7){
NSLog(@"走流程7");
}
}
- (void)didReceiveMemoryWarning {
[superdidReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
// ViewController.m
// differentVersions
//
// Created by wusiping on 15/11/21.
// Copyright (c) 2015年 wusiping. All rights reserved.
//
#import "ViewController.h"
#define iOS8 [[UIDevice currentDevice].systemVersion intValue] ==
8
#define iOS7 [[UIDevice currentDevice].systemVersion intValue] ==
7
#define iOS9 [[UIDevice currentDevice].systemVersion intValue] ==
9
// 自定义Log
#ifdef DEBUG
#define NSLog(...) NSLog(__VA_ARGS__)
#else
#define NSLog(...)
#endif
@interface
ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[superviewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
if (iOS8) {
NSLog(@"走流程8");
}else if(iOS7){
NSLog(@"走流程7");
}
}
- (void)didReceiveMemoryWarning {
[superdidReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
相关文章推荐
- 二维码的扫描--iOS
- iOS开发中的正则表达式(转)
- 获取BIOS常规内存容量
- iOS 视图被覆盖时怎么接受事件处理
- iOS笔记--oc语法5 (static全局变量与全局变量)
- ios 7 模糊效果
- IOS开发之----Xcode非ARC项目中设置部分文件ARC支持
- iOS开发- 蓝牙后台接收数据(BLE4.0)
- Gitolite安装使用
- [IOS开发教程] ios开发培训:浅析最方便的iOS开发环境
- 告诉你 IOS9.0 之后的Bitcode到底是什么!!
- 如何用IOS调用WebService(SOAP接口)
- IOS图层Layer学习笔记(四)—— CAShapeLayer
- 苹果ios开发者证书申请及应用上线发布 真机调试
- iOS代理,协议
- iOS 使用tableView实现 个人中心列表
- iOS 设计模式
- iOS9适配之BitCode
- iOS 骰子战争 Dice Wars
- iOS 利用mask layer 使view中扣掉一块露出下边的view