摘要: 0CGContextRef context = UIGraphicsGetCurrentContext(); 设置上下文1 CGContextMoveToPoint 开始画线2 CGContextAddLineToPoint 画直线4 CGContextAddEllipseInRect 画一椭圆4 CGContextSetLineCap 设置线条终点形状4 CGContextSetLineDash 画虚线4 CGContextAddRect 画一方框4 CGContextStrokeRect 指定矩形4 CGContextStrokeRectWithWidth 指定矩形线宽度4 CGConte 阅读全文
posted @ 2012-09-13 11:00 奔放小青年 阅读(368) 评论(0) 推荐(0) 编辑
摘要: UITableView的强大更多程度上来自于可以任意自定义UITableViewCell单元格。通常,UITableView中的Cell是 动态的,在使用过程中,会创建一个Cell池,根据每个cell的高度(即tableView:heightForRowAtIndexPath:返回 值),以及屏幕高度计算屏幕中可显示几个cell。而进行自定义TableViewCell无非是采用代码实现或采用IB编辑nib文件来实现两种方式, 本文主要收集代码的方式实现各种cell自定义。如何动态调整Cell高度-(UITableViewCell*)tableView:(UITableView*)tableVi 阅读全文
posted @ 2012-08-07 13:24 奔放小青年 阅读(29920) 评论(0) 推荐(1) 编辑
摘要: 在 iPhone 或 iPad 的开发中,除了用touchesBegan / touchesMoved / touchesEnded这组方法来控制使用者的手指触控外,也可以用UIGestureRecognizer的衍生类別来进行判断。用UIGestureRecognizer的好处在于有现成的手势,开发者不用自己计算手指移动轨迹。UIGestureRecognizer的衍生类別有以下几种:UITapGestureRecognizerUIPinchGestureRecognizerUIRotationGestureRecognizerUISwipeGestureRecognizerUIPanGes 阅读全文
posted @ 2012-08-06 11:22 奔放小青年 阅读(370) 评论(0) 推荐(0) 编辑
摘要: 1,获取翻转事件,并开启翻转:只要在viewcontroller的类中加入-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{//翻转后要执行的代码return YES;}2,-(void)viewWillAppear:(BOOL)animated,- (void)viewDidLoad 的区别。viewwillappear是每次视图控制器的视图出现前执行的代码。而viewdidload是每次视图控制器载入是执行的代码。比如说:当a视图控制器的视图第一次出现是两 阅读全文
posted @ 2012-08-06 11:17 奔放小青年 阅读(4290) 评论(0) 推荐(3) 编辑
摘要: 来自:http://www.dreamingwish.com/dream-2011/apples-third-party-development-libraries-asihttprequest.html第三方苹果开发库之ASIHTTPRequestASIHttpRequest库简介、配置和安装ASIHttpRequest-创建和执行requestASIHttpRequest-发送数据ASIHTTPRequest-下载数据ASIHTTPRequest-进度追踪ASIHTTPRequest-身份验证ASIHTTPRequest-HTTP授权-流程图ASIHTTPRequest-Cookie的使用 阅读全文
posted @ 2012-08-03 18:01 奔放小青年 阅读(11412) 评论(0) 推荐(2) 编辑
摘要: 给下面一个这样的字符串去处理让人好头大,在java里的处理貌似很简单, ArrayList<String>貌似就解决的差不多了NSString*str=@"0000##17#4#32@?????????????@002@@2010-03-1611:25:24.834259*31@??????????????@002@@2009-12-15 15:51:57.203038*30@????????????????????@002@@2009-12-1222:04:52.985329*29@?????917????6?11????1660@002@@2009-12-1222:0 阅读全文
posted @ 2012-08-03 17:32 奔放小青年 阅读(11125) 评论(0) 推荐(0) 编辑
摘要: 来自:http://blog.sina.com.cn/s/blog_85c1f6a50100zadl.html加载MFMessageComposeViewController- (void)showMessageView{if( [MFMessageComposeViewControllercanSendText] ){MFMessageComposeViewController* controller = [[MFMessageComposeViewControlleralloc]init];//autorelease];controller.recipients= [NSArrayarra 阅读全文
posted @ 2012-08-03 17:24 奔放小青年 阅读(1200) 评论(0) 推荐(0) 编辑
摘要: 来自:http://blog.csdn.net/bl1988530/article/details/6597230iPhoneAPI已经提供了系统写邮件界面的接口,使用MFMailComposeViewController,用来显示界面. 项目中需要添加MessageUi.framework。头文件加入MFMailComposeViewControllerDelegate。#import<MessageUI/MessageUI.h> sendMailViewController.m文件的实现: -(void)viewDidLoad{UIButton*button=[UIButton 阅读全文
posted @ 2012-08-03 17:12 奔放小青年 阅读(2292) 评论(0) 推荐(0) 编辑
摘要: 来自:http://blog.csdn.net/shijiucdy/article/details/7364143-(void)viewDidLoad{ UISwipeGestureRecognizer*recognizer; recognizer = [[UISwipeGestureRecognizeralloc]initWithTarget:selfaction:@selector(handleSwipeFrom:)]; [recognizersetDirection:(UISwipeGestureRecognizerDirectionRight)]; [[selfview]addG... 阅读全文
posted @ 2012-08-03 16:55 奔放小青年 阅读(5275) 评论(0) 推荐(0) 编辑
摘要: 来自:http://www.devdiv.com/thread-69786-1-1.htmlUILocalNotification *notification=[[UILocalNotification alloc] init]; if (notification!=nil) { NSDate *now=[NSDate new]; //notification.fireDate=[now addTimeInterval:period]; notification.fireDate = [now dateByAddingTimeInterval:period]... 阅读全文
posted @ 2012-08-02 10:28 奔放小青年 阅读(450) 评论(0) 推荐(0) 编辑