06 2016 档案

摘要:第一步 创建一个UIView类 命名MoveView 在ViewController 里面的代码有注释 阅读全文
posted @ 2016-06-27 11:30 与格律上 阅读(238) 评论(0) 推荐(0)
摘要:#import "ViewController.h" @interface ViewController () /** 创建一个UIView */ @property(nonatomic , weak) UIView * gestureView; @end @implementation ViewController - (void)viewDidLoad { [super... 阅读全文
posted @ 2016-06-26 21:24 与格律上 阅读(270) 评论(0) 推荐(0)
摘要:界面搭建 创建一个画饼状的类 eatView 集成UIView #import "eatView.h" @implementation eatView // Only override drawRect: if you perform custom drawing. // An empty impl 阅读全文
posted @ 2016-06-26 20:38 与格律上 阅读(403) 评论(0) 推荐(0)
摘要:赋值 // 能修改私有成员变量 - (void)setValue:(id)value forKey:(NSString *)key; - (void)setValue:(id)value forKeyPath:(NSString *)keyPath; - (void)setValuesForKeys 阅读全文
posted @ 2016-06-06 22:42 与格律上 阅读(179) 评论(0) 推荐(0)
摘要:加载xib2中方式 NSArray *array = [[NSBundle mainBundle] loadNibNamed:@"xib名称" owner:nil options:nil]; UINib *nib = [UINib nibWithNibName:@"xib名称" bundle:nil 阅读全文
posted @ 2016-06-06 22:39 与格律上 阅读(912) 评论(0) 推荐(0)
摘要:图片拉伸 +(UIImage*)wlisWithImage:(NSString *)name{ //获取图片 UIImage * img=[UIImage imageNamed:name]; //获取图片宽 CGFloat imgW=img.size.width; //获取图片高 CGFloat i 阅读全文
posted @ 2016-06-06 22:36 与格律上 阅读(478) 评论(0) 推荐(0)
摘要:代码创建 //创建UIButton UIButton * btnType=[[UIButton alloc]init]; //设置UIControlStateNormal状态下的文字颜色 [btnType setTitleColor:[UIColor blackColor] forState:UIC 阅读全文
posted @ 2016-06-06 21:22 与格律上 阅读(3895) 评论(0) 推荐(0)
摘要:代码创建 /** 创建UIImageView */ UIImageView * imageView=[[UIImageView alloc]init]; /** 设置尺寸位置 */ imageView.frame=(CGRect){{50,50},{230,230}}; /** 创建图片 */ UI 阅读全文
posted @ 2016-06-06 21:15 与格律上 阅读(2384) 评论(0) 推荐(0)
摘要:// 创建label UILabel *label = [[UILabel alloc] init]; // 设置显示的文字 label.text = @"Hello world!Hello world!Hello world!Hello world!"; // 设置frame label.fram 阅读全文
posted @ 2016-06-06 21:08 与格律上 阅读(785) 评论(0) 推荐(0)
摘要:常见属性: @property(nonatomic,readonly) UIView *superview; 获得自己的父控件对象 @property(nonatomic,readonly,copy) NSArray *subviews; 获得自己的所有子控件对象 @property(nonatom 阅读全文
posted @ 2016-06-06 21:05 与格律上 阅读(368) 评论(0) 推荐(0)
摘要:功能很简单就是点击按钮加大图片 在点击图片还原回去 判断条件主要判断阴影是否为0 判断阴影按钮的透明度 阅读全文
posted @ 2016-06-05 21:33 与格律上 阅读(226) 评论(0) 推荐(0)
摘要:了解 animateWithDuration方法 制作动画变得不值钱 代码创建一个UIImageView 后加入self.view 容器中 调用点击屏幕touchesBegan 方法执行动画 #import "ViewController.h" @interface ViewController ( 阅读全文
posted @ 2016-06-05 19:51 与格律上 阅读(315) 评论(0) 推荐(0)
摘要:控件通过xib,storyboard创建,初始化设置一定会调用initWithCoder awakeFromNib 加载完毕的时候肯定会调用 layoutSubviews 布局子控件 位置和尺寸 利用代码证实 先创建wlisView.xib 拖两个控件 imageView 和 Label 创建一个类 阅读全文
posted @ 2016-06-05 19:04 与格律上 阅读(237) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2016-06-04 17:36 与格律上 阅读(453) 评论(0) 推荐(0)
摘要:1.如果是在打开的文档范围内: 查找: Command+ F 替换: Option+Command+F Replace All 是全部替换本文档范围内的字符串 Replace 是替换当前字符串 Replace & Find是边查找边替换 2.如果是全局查找和替换 查找:点击左边工具栏里面的“放大镜” 阅读全文
posted @ 2016-06-03 17:19 与格律上 阅读(177) 评论(0) 推荐(0)
摘要:1.如果是在打开的文档范围内: 查找: Command+ F 替换: Option+Command+F Replace All 是全部替换本文档范围内的字符串 Replace 是替换当前字符串 Replace & Find是边查找边替换 2.如果是全局查找和替换 查找:点击左边工具栏里面的“放大镜” 阅读全文
posted @ 2016-06-03 17:18 与格律上 阅读(224) 评论(0) 推荐(0)
摘要:我个人觉得这么理解就够了 其他的以后再说 阅读全文
posted @ 2016-06-02 16:46 与格律上 阅读(104) 评论(0) 推荐(0)