//在viewDidLoad方法中创建Toolbartoolbar = [[UIView
alloc] initWithFrame:CGRectMake(0, 0, 320, 66)];toolbar.backgroundColor =
[UIColor redColor];//添加到tableVi...
分类:
移动开发 时间:
2014-05-26 13:29:07
阅读次数:
207
初识CGImageRef是在一张大图片中裁剪出其中的小图片用到的,具体如下:UIImage
*bigImage = [UIImageimageNamed:@"big”];CGFloatsmallW = bigImage.size.width/12 *
[UIScreenmainScreen].sca...
分类:
其他好文 时间:
2014-05-26 13:05:13
阅读次数:
203
1 UIImage *image = [UIImage
imageNamed:tempAppInfo.icon];2 UIImageView *appIcon = (UIImageView *) [appView
viewWithTag:0]; 3 appIcon.image = image;每次执...
分类:
其他好文 时间:
2014-05-26 12:35:45
阅读次数:
226
在ios的UI交互设计时,对图片的处理是难免的;不同的处理方式会对内存有不同的影响;************************************************************a:图片格式及NSBundle加载全路径:
1》xcode或者说苹果官方是极力推荐使用的图片格....
分类:
移动开发 时间:
2014-05-26 12:22:07
阅读次数:
280
//16进制颜色(html颜色值)字符串转为UIColor+(UIColor *)
hexStringToColor: (NSString *) stringToConvert{ NSString *cString =
[[stringToConvert stringByTrimmingCh...
分类:
移动开发 时间:
2014-05-26 08:43:21
阅读次数:
207
图像选择器(UIImagePickerController)显示用户的照片库,用户选择照片后,图像选择器返回一个相应的UIImage对象。要显示图像选择器,可分配并初始化一个UIImagePickerController实例,再设置属性sourceType,以指定用户可从哪些地方选择图像。UIIma...
分类:
其他好文 时间:
2014-05-24 11:31:48
阅读次数:
332
1.CUICatalog: Invalid asset name supplied: , or
invalid scale factor: 2.000000=》原因:You are calling[UIImage
imageNamed:@""]or[UIImage imageNamed:nil].N...
分类:
移动开发 时间:
2014-05-23 06:48:14
阅读次数:
273
-(UIButton *)shareButtonWithIcon:(NSString
*)iconName{ UIButton *button = [UIButtonbuttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(100.....
分类:
其他好文 时间:
2014-05-23 05:33:28
阅读次数:
221
利用CAShapeLayer可以制作出任意的几何图形,把它作为UIImageView的遮罩,达到把图片做成圆形效果。
imgView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 35, 80, 80)];
imgView.image = [UIImage imageNamed:@"ma.jpg"];
UIBez...
分类:
移动开发 时间:
2014-05-22 22:51:33
阅读次数:
485
UIImage *image01 = [UIImage imageNamed:@"002.png"];//原图
NSData *dataOf02 =UIImageJPEGRepresentation(image01, 0.5);//压缩图片内容,不影响图片的size,得到一个原大小,但更模糊的图片。
UIImage *image02 = [UIImage imageWit...
分类:
其他好文 时间:
2014-05-21 08:14:49
阅读次数:
315