摘要: #import #define knum 5 #define kArr "shuguangnvshen" int main(int argc, const char * argv[]) { //数组:数组是一组具有相同数据类型的成员组成的有序的集合 //格式:类型修饰符 数组名=(赋值运算符) {数组元素}; //访问数组元素:数组名加下标; ... 阅读全文
posted @ 2016-05-09 19:53 胡一波 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 9 #import 10 11 int main(int argc, const char * argv[]) { 12 13 /*#pragam mark--while-- 14 if (条件表达式){语句;} 15 16 while(条件表达式){循环体;} 17 18 */ 19 //要打印100次我爱你 20 //首先定义一个变量接... 阅读全文
posted @ 2016-05-09 19:52 胡一波 阅读(287) 评论(0) 推荐(0) 编辑
摘要: #import //宏定义 //宏定义 一般使用于大型项目开发当中,或者在工作中经常使用的一些数据或者是接口(网址)我们使用宏定义的时候可以这样理解:理解为为我们的接口或者数据重新起一个名字用于代表这些数据或者接口. // //#define Num 123456 int main(int argc, const char * argv[]) { // int num1 =... 阅读全文
posted @ 2016-05-09 19:50 胡一波 阅读(542) 评论(0) 推荐(0) 编辑
摘要: //注释:可以注释一段代码,起到了解释说明的作用,注释使我们的程序员变成思维的体现,注释不参与程序运行. /* 这是多行注释. comd+z:撤销 comd+,:设置 comd+a:全选 comd+shift+n:新建一个工程 comd+[:让我们的代码行左移 comd+]:让我们的代码行右移 */ #pragma mark 快捷键 //#import:导入 //#... 阅读全文
posted @ 2016-05-09 19:49 胡一波 阅读(202) 评论(0) 推荐(0) 编辑
摘要: MyObject类.m中 阅读全文
posted @ 2016-04-09 10:53 胡一波 阅读(100) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; #pragma mark --NSInvocationOperation方法-- /... 阅读全文
posted @ 2016-04-09 10:50 胡一波 阅读(102) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; //[NSThread currentThread] 获取当前的线程 NSLog... 阅读全文
posted @ 2016-04-08 23:21 胡一波 阅读(84) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h" #import "RSA.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; //公钥,用于加密数据. 用于公开, 一般存放在数据提供方... 阅读全文
posted @ 2016-04-07 20:57 胡一波 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 引入头文件 #import "ViewController.h" #import "KeychainItemWrapper.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; //创建... 阅读全文
posted @ 2016-04-07 20:55 胡一波 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 引入框架#import "ViewController.h" #import @interface ViewController () //添加数组属性 @property (nonatomic, strong) NSMutableArray *array; @end @implementation ViewController #warning ---重中之重--- //移除观察... 阅读全文
posted @ 2016-04-07 20:50 胡一波 阅读(110) 评论(0) 推荐(0) 编辑