摘要: 转自://http://mp.weixin.qq.com/s?__biz=MjM5OTM0MzIwMQ==&mid=404356053&idx=5&sn=0ccb4ffa5bd12986898f57aef66edbce&scene=0#wechat_redirect 感觉博主写的还不错,以前对这三个 阅读全文
posted @ 2016-03-17 22:15 翌日晨曦 阅读(629) 评论(0) 推荐(0)
摘要: 单例传值 //单例的.h文件 @property(strong,nonatomic)NSString *name; +(userInfo *)shareinstence; //单例的.m文件 static userInfo *instence=nil; //第一种写法 //+(userInfo *) 阅读全文
posted @ 2016-03-16 21:53 翌日晨曦 阅读(295) 评论(0) 推荐(0)
摘要: //声明一个文本框和一个按钮 @property(strong,nonatomic)UITextField *textName; @property(strong,nonatomic)UIButton *button; ViewController.m - (void)viewDidLoad { [ 阅读全文
posted @ 2016-03-15 22:46 翌日晨曦 阅读(257) 评论(0) 推荐(0)
摘要: 引导页面的代码.h #import <UIKit/UIKit.h> #import "leadimageViewController.h" #define WIDTH self.view.frame.size.width #define HEIGHT self.view.frame.size.hei 阅读全文
posted @ 2016-03-14 22:47 翌日晨曦 阅读(493) 评论(0) 推荐(0)
摘要: //自己新建的一个类,随便取一个名字,我的叫Myprogressvie.h   #import <UIKit/UIKit.h> @interface Myprogressvie : UIView { //定义第一个视图     UIView *bigView; //定义第一个视图     UIVie 阅读全文
posted @ 2016-03-13 22:29 翌日晨曦 阅读(315) 评论(0) 推荐(0)
摘要: #import <UIKit/UIKit.h> @interface ViewController : UIViewController<UIPickerViewDataSource,UIPickerViewDelegate> @property(strong,nonatomic)UIPickerV 阅读全文
posted @ 2016-03-12 22:12 翌日晨曦 阅读(702) 评论(0) 推荐(0)
摘要: static 关键字的作用: 1、变量的内存只被分配一次 2、他的作用域跟其他变量无差别 关键字const 不是常数,可以是变量,只是你不能修改它 1) 关键字const的作用是为给读你代码的人传达非常有用的信息,实际上,声明一个参数为常量是为了告诉了用户这个参数的应用目的。如果你曾花很多时间清理其 阅读全文
posted @ 2016-03-11 23:25 翌日晨曦 阅读(124) 评论(0) 推荐(0)
摘要: 使用UIAlertController需要三步 1、实例化alert:alertControllerWithTitle 2、实例化按钮:actionWithTitle 3、显示alertController:presentViewController 下面是实现上面三步的简单代码 //实例化aler 阅读全文
posted @ 2016-03-10 22:02 翌日晨曦 阅读(398) 评论(0) 推荐(0)
摘要: ViewController.h //定义一个按钮button @property(strong,nonatomic)UIButton *button; ViewController.m #import "ViewController.h" //导入头文件 #import <AVFoundation 阅读全文
posted @ 2016-03-09 22:25 翌日晨曦 阅读(1248) 评论(0) 推荐(0)
摘要: ViewController.h @property(strong,nonatomic)UIButton *button; @property(assign,nonatomic)int number; ViewController.m //每一排的个数 int index=5; //按钮的宽度 CG 阅读全文
posted @ 2016-03-08 22:52 翌日晨曦 阅读(282) 评论(0) 推荐(0)