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

浙公网安备 33010602011771号