2011年12月16日

摘要: 阅读全文
posted @ 2011-12-16 17:06 uniy 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 1、图片拉伸UIImage *img = [UIImage imageNamed:@"inputbox.png"];UIImage *stretchedImage = [img stretchableImageWithLeftCapWidth:20.0f topCapHeight:10.0f];2、键盘高度 ios5 以前中文键盘高度216.0f ios5 以后中文键盘高度252.0f3、emoji小图标http://www.easyapns.com/iphone-emoji-alerts4、使用ASI时,需要引入的一些framework5、获取documents目录和资源 阅读全文
posted @ 2011-12-16 10:59 uniy 阅读(350) 评论(0) 推荐(0) 编辑

2011年12月15日

摘要: for(UIView *subview in [view subviews]) { [subview removeFromSuperview];}for(UIView *subview in [view subviews]) { if([subview isKindOfClass:[UIButton class]]) { [subview removeFromSuperview]; } else { // Do nothing - not a UIButton or subclass instance }} 阅读全文
posted @ 2011-12-15 10:39 uniy 阅读(201) 评论(0) 推荐(0) 编辑

2011年12月13日

摘要: You usually want to useNSIntegerwhen you don't know what kind of processor architecture your code might run on, so you may for some reason want the largest possibleinttype, which on 32 bit systems is just anint, while on a 64-bit system it's along.I'd stick with usingNSIntegerinstead ofi 阅读全文
posted @ 2011-12-13 09:46 uniy 阅读(646) 评论(0) 推荐(0) 编辑

2011年12月7日

摘要: Icon-72.png 72x72Icon-Small-50.png 50x50Icon-Small.png 29x29Icon-Small@2x.png 58x58Icon.png 57x57Icon@2x.png 114x114// info.plist 阅读全文
posted @ 2011-12-07 13:46 uniy 阅读(171) 评论(0) 推荐(0) 编辑

2011年12月4日

摘要: http://developer.apple.com/library/ios/#samplecode/QuartzDemo/Introduction/Intro.html 阅读全文
posted @ 2011-12-04 00:44 uniy 阅读(179) 评论(0) 推荐(0) 编辑
摘要: View Code // 渐变色 gradient CGFloat colors [] = { 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0 }; CGFloat locations[] = { 0.0f,0.5f,1.0f }; CGColorSpaceRef baseSpace = CGColorSpaceCreateDeviceRGB(); CGGradientRef gradient = CGGradientCreat... 阅读全文
posted @ 2011-12-04 00:35 uniy 阅读(531) 评论(0) 推荐(0) 编辑
摘要: View Code // 画贝塞尔曲线 CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetRGBStrokeColor(context, 255.0f, 255.0f, 255.0f, 1.0f); CGContextMoveToPoint(context, 100.0f, 100.0f); // 端点一 CGContextSetLineWidth(context, 2.0f); // (200, 150) 控制点一 (50, 200) ... 阅读全文
posted @ 2011-12-04 00:32 uniy 阅读(436) 评论(0) 推荐(0) 编辑
摘要: View Code // 画不规则形状 CGContextRef contextRef = UIGraphicsGetCurrentContext(); CGContextSetRGBStrokeColor(contextRef, 1.0f, 1.0f, 1.0f, 1); // 填充时用不到 CGContextSetLineWidth(contextRef, 2.0f); // 填充时用不到 CGFloat components[] = { 1.0f, 0.0f, 0.0f, 1.0f}; CGConte... 阅读全文
posted @ 2011-12-04 00:30 uniy 阅读(362) 评论(0) 推荐(0) 编辑
摘要: View Code CGContextRef context=UIGraphicsGetCurrentContext(); CGContextSetRGBStrokeColor(context, 1.0, 1.0, 1.0, 1.0); // If you were making this as a routine, you would probably accept a rectangle // that defines its bounds, and a radius reflecting the "rounded-ness" of the rectangle... 阅读全文
posted @ 2011-12-04 00:25 uniy 阅读(524) 评论(0) 推荐(0) 编辑

导航