2011年12月4日

摘要: View Code // 画扇形 // 红色部分 CGContextRef contextRef = UIGraphicsGetCurrentContext(); CGFloat components[] = { 1.0f, 0.0f, 0.0f, 1.0f}; CGContextSetFillColor(contextRef, components); CGContextMoveToPoint(contextRef, 150.0f, 150.0f); CGContextAddArc(contextRef, 150.0f, 150.0f, 100.0f... 阅读全文
posted @ 2011-12-04 00:23 uniy 阅读(378) 评论(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}; CGContextSetFillColor(contextRef, components); ... 阅读全文
posted @ 2011-12-04 00:21 uniy 阅读(460) 评论(0) 推荐(0) 编辑
摘要: View Code // 画矩形和圆形(椭圆也是圆哦) CGContextRef contextRef = UIGraphicsGetCurrentContext(); CGContextSetRGBStrokeColor(contextRef, 1.0f, 1.0f, 1.0f, 1); CGContextSetLineWidth(contextRef, 2.0f); CGContextAddRect(contextRef, CGRectMake(50.0f, 50.0f, 200.0f, 100.0f)); CGContextAddEllipseInRect... 阅读全文
posted @ 2011-12-04 00:17 uniy 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 1、画直线和虚线View Code // 画线 CGContextRef contextRef = UIGraphicsGetCurrentContext(); // 线边冒的三种类型 // CGLineCap. kCGLineCapButt, kCGLineCapRound, kCGLineCapSquare CGLineCap lineCap = kCGLineCapButt; // 线段拐角出设置的三种类型 // CGLineJoin. kCGLineJoinMiter(直角), kCGLineJoinRound(圆角), kCGLineJoinBe... 阅读全文
posted @ 2011-12-04 00:07 uniy 阅读(1780) 评论(0) 推荐(0) 编辑

2011年11月29日

摘要: 阅读全文
posted @ 2011-11-29 23:55 uniy 阅读(297) 评论(0) 推荐(0) 编辑

2011年11月28日

摘要: just makeitscontentViewControllerto be a UINagivationController, and setthetitleof its root view controllerVersionInfoController *versionInfo = [[VersionInfoController alloc] initWithNibName:@"VersionInfoController" bundle:nil]; versionInfo.title = @"About"; UINavigationControlle 阅读全文
posted @ 2011-11-28 15:57 uniy 阅读(239) 评论(0) 推荐(0) 编辑

2011年11月24日

摘要: 1 、将你下载的Three20包中的src目录拷贝到你项目的跟目录下, 以便项目编译的时候,每次都能找到源文件。2、将src/Three20/目录下的Three20.xcodeproj拖拽到你项目的Groups and Files 下,这时出现一个对话框,不要选择 Copy items,Reference Tpye 那一项选择Relative to Project 。然后 add。3、双击打开你项目中的Three20,就是你刚刚添加进去的那个。然后选中Dependencies下面列表,同样地拖拽到你的项目中,这样你的项目中就有了这些:Three20CoreThree20NetworkThree 阅读全文
posted @ 2011-11-24 21:40 uniy 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1 // 解压文件 2 NSString *filePath = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:@"sgz.zip"]; 3 NSString *unZipedFilePath = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:@& 阅读全文
posted @ 2011-11-24 21:21 uniy 阅读(2577) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-11-24 15:19 uniy 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-11-24 15:18 uniy 阅读(200) 评论(0) 推荐(0) 编辑

导航