Invalid asset name supplied: , or invalid scale factor: 2.000000错误解决方法:
错误原因:在ios7中设置imageView的image时,实例化image时不能传nil,(cell.imageView.image = [UIImage imageNamed:nil] 上图所报的错,就是因为这句话)。
在ios6中,这...
分类:
其他好文 时间:
2014-09-24 19:59:37
阅读次数:
203
UIImage *image = [UIImage imageNamed:@"back2.jpg"]; //创建一个图片对象,这个方法如果图片名称相同,不管我们调用多少次,得到的都是同一个图片对象。 self.view.backgroundColor = [UIColor colorWithPat....
分类:
其他好文 时间:
2014-09-24 16:23:57
阅读次数:
174
RT
CIContext *context = [CIContext contextWithOptions:nil];
CIImage *inputImage = [[CIImage alloc] initWithImage:[UIImage imageNamed:@"1.png"]];
// create gaussian blur filter
CIF...
分类:
移动开发 时间:
2014-09-23 15:03:36
阅读次数:
394
转: Apple官方的文档为生成一个UIImage对象提供了两种方法: 1. imageNamed,其参数为图片的名字; 2.?imageWithContentsOfFile,其参数也是图片文件的路径。 那么两种有什么区别吗? 肯定是有的。根据Apple的官...
分类:
移动开发 时间:
2014-09-18 13:26:15
阅读次数:
155
- (void)viewDidLoad{ [super viewDidLoad]; self.view.backgroundColor = [UIColor whiteColor]; UIImage *image = [UIImage imageNamed:@"2"]; //原图片 UIIm...
分类:
其他好文 时间:
2014-09-17 18:34:14
阅读次数:
231
UIImage常用的加载图片有3种方式:p_w_picpathNamed,p_w_picpathWithContentsOfFile,initWithContentsFile.p_w_picpathNamed:UIImagep_w_picpath=[UIImagep_w_picpathNamed:@"p_w_picpath.gif"].得到的对象是autoRelease的。这个方法有点特殊,它在生成p_w_picpath对象的同时,..
分类:
其他好文 时间:
2014-09-15 19:42:30
阅读次数:
232
Apple官方的文档为生成一个UIImage对象提供了两种方法加载图片:1.imageNamed,其参数为图片的名字;2.imageWithContentsOfFile,其参数也是图片文件的路径。那么两种有什么区别吗?肯定是有的。根据Apple的官方文档:imageNamed:这 个方法用一个指定的...
分类:
其他好文 时间:
2014-09-09 21:22:39
阅读次数:
184
//rightBar button UIButton *rightButton = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 34, 34)]; [rightButton setImage:[UIImage imageNamed:@"shar.....
分类:
其他好文 时间:
2014-08-28 13:06:09
阅读次数:
211
- (void)imageBg{ UIImage *oldImage = [UIImage imageNamed:@"me"]; UIGraphicsBeginImageContextWithOptions(self.view.frame.size, NO, 0.0); [oldImage dra....
分类:
移动开发 时间:
2014-08-27 21:55:28
阅读次数:
228
一.读取图片1.从资源(resource)读取1 UIImage* image=[UIImage imageNamed:@"1.jpg"]; 2.从网络读取【最好使用EGOImageView来获取网络图片】1 NSURL *url=[NSURL URLWithString:@"http://www....
分类:
移动开发 时间:
2014-08-25 22:46:45
阅读次数:
360