摘要: [request setDidReceiveResponseHeadersSelector:@selector(didReceiveResponseHeaders:)];- (void)didReceiveResponseHeaders:(ASIHTTPRequest *)request{ N... 阅读全文
posted @ 2012-12-13 14:44 沙影无痕 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 创建一个 Timer+ scheduledTimerWithTimeInterval: invocation: repeats:+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti invocation:(NSInvocat... 阅读全文
posted @ 2012-12-11 10:44 沙影无痕 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 在开发的过程中,有时候需要用到可以移动的Button,这就需要自己去写一个了;设计思路:通过重写几个touch方法- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { if (!isMove && !isCance... 阅读全文
posted @ 2012-12-10 15:39 沙影无痕 阅读(162) 评论(0) 推荐(0) 编辑
摘要: if(bt.tag == 100){//转全屏 bt.tag = 101; [[UIApplication sharedApplication] setStatusBarHidden:YES]; self.view.frame = CGRectMak... 阅读全文
posted @ 2012-12-04 10:46 沙影无痕 阅读(433) 评论(0) 推荐(0) 编辑
摘要: UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;获取当前屏幕的方向;[[UIApplication sharedApplication] setStatusBarH... 阅读全文
posted @ 2012-12-04 10:39 沙影无痕 阅读(255) 评论(0) 推荐(0) 编辑
摘要: (1)系统去首尾空格方法,使用NSString中的str = [str stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]方法只是去掉左右两边的空格;(2)替换的方法,使用NSString *strUrl ... 阅读全文
posted @ 2012-11-28 10:40 沙影无痕 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 先在.h里面定义一个变量CGPoint startPoint;然后在.m里面加入下面两个方法:- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event{ //保存触摸起始点位置 CGPoint point=[[touch... 阅读全文
posted @ 2012-11-19 15:53 沙影无痕 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 身份验证,需要条件也就是一个验证的服务器端,这里采用的是一个免费的网络虚拟主机,上传一个index.php的页面进行验证,附上index.php- (void) didFinishPostlogin:(ASIHTTPRequest *) request { NSData *data =[req... 阅读全文
posted @ 2012-11-15 16:27 沙影无痕 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 在viewdidload 加载 [self didLoadAudioPlayer];- (void) didLoadAudioPlayer{ NSString * musicFilePath = @"/Users/Shared/test.mp3"; //创建音乐文件路径 ... 阅读全文
posted @ 2012-11-15 11:55 沙影无痕 阅读(192) 评论(0) 推荐(0) 编辑
摘要: //建立音频会话和声音文件的URL//注: 在.h引用里面加入AVAudioSessionDelegate以及AVAudioRecorderDelegate- (void) viewDidLoad { [super viewDidLoad]; NSString *soundFilePa... 阅读全文
posted @ 2012-11-15 10:45 沙影无痕 阅读(164) 评论(0) 推荐(0) 编辑