当我们使用AutoLayout做适配时,可能会有这样的需求,就是在想在适配完成前就取得子控件的真实frame,来做一些操作。比如我们想把一个正方形的UIImageView剪成一个圆形,这时候就需要这么做self.imageView.layer.cornerRadius = self.imageVie...
分类:
其他好文 时间:
2016-01-25 14:57:13
阅读次数:
126
1 #import "NJViewController.h" 2 3 @interface NJViewController () 4 @property (weak, nonatomic) IBOutlet UIImageView *iconView; 5 - (IBAction)nextBt.....
分类:
移动开发 时间:
2016-01-24 12:52:20
阅读次数:
197
1 #import "NJViewController.h" 2 3 @interface NJViewController () 4 @property (weak, nonatomic) IBOutlet UIImageView *iconView; 5 6 @end 7 8 @impl...
分类:
移动开发 时间:
2016-01-23 22:59:22
阅读次数:
249
//// ViewController.m// UIImageView详解//// Created by 大欢 on 16/1/20.// Copyright © 2016年 bjsxt. All rights reserved.//#import "ViewController.h"@interf...
分类:
移动开发 时间:
2016-01-20 22:29:31
阅读次数:
228
首先我们要布局一下,使用sizeclass来布局:连线过来:
@property (weak, nonatomic) IBOutlet UIButton *bird;
@property (strong, nonatomic) IBOutletCollection(UIImageView) NSArray *ices;对于冰块的连线,因为我们这里的冰块有4块,所以我们直接连的是一个数组
懒加载一个U...
分类:
其他好文 时间:
2016-01-19 10:40:53
阅读次数:
153
UIImageView设置为圆形的方法: _Image.layer.masksToBounds = YES; _Image.layer.cornerRadius = self.Image.frame.size.width / 2;设置加载本地图片的方法: _Image.image = [UI...
分类:
移动开发 时间:
2016-01-19 01:31:36
阅读次数:
191
#import "ViewController.h"#import @interface ViewController ()@property (weak, nonatomic) IBOutlet UIImageView *imageView;@end@implementation ViewCont...
分类:
其他好文 时间:
2016-01-18 22:49:03
阅读次数:
230
@interface AppDelegate ()@property(strong,nonatomic) UIImageView *launchImaViewO;@property(strong,nonatomic) UIImageView *launchImaViewT;@end@implemen...
分类:
其他好文 时间:
2016-01-18 10:20:08
阅读次数:
201
UIImageView*image=[[UIImageViewalloc]init];image.frame=CGRectMake(50,50,200,200);image.image=[UIImageimageNamed:@"460.jpg"];[self.viewaddSubview:image...
分类:
Web程序 时间:
2016-01-16 14:16:17
阅读次数:
412
iOS 滑动性能优化目录一、 减少图层的Blend操作1. UIView的背景色避免使用clearColor2. 控件贴图避免使用带alpha的图片3. UIImageView 使用时避免半透明二、适当使用Rasterize三、避免图片资源的重采样总结更多参考资料一、 减少图层的Blend操作展示半...
分类:
移动开发 时间:
2016-01-16 01:23:04
阅读次数:
179