摘要: ios 调用系统打电话一般有三种方式(1)拨打电话完毕会停留在打电话app,不会返回原来应用[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://10086"]];(2)拨打电话完毕,会返回原app,不过改方法... 阅读全文
posted @ 2013-04-28 09:36 沙影无痕 阅读(209) 评论(0) 推荐(0) 编辑
摘要: ios开发中,在主线程之外的线程更新主线程所显示的界面元素,不能直接调用主线程的类的更新界面的方法,否则界面看不到任何结果,而是需要有个缓冲,叫做 performSelectorOnMainThread使用方法是,在线程调用到更新界面那个类的时候,在更新界面前,通过如下调用[self perform... 阅读全文
posted @ 2013-04-28 09:24 沙影无痕 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 1.0 MPMediaQueue MPMediaQuery *allMediaQueue = [[[MPMediaQuery alloc]init] autorelease]; [self.mediaItemArray addObjectsFromArray:[allMediaQueue... 阅读全文
posted @ 2013-04-22 16:17 沙影无痕 阅读(166) 评论(0) 推荐(0) 编辑
摘要: UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 44)]; label.font=[UIFont systemFontOfSize:16]; label.backgroundColor = [UI... 阅读全文
posted @ 2013-04-16 16:53 沙影无痕 阅读(150) 评论(0) 推荐(0) 编辑
摘要: - (void)sendRequest:(id)sender { NSURL *URL = [NSURL URLWithString:@"http://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&lang=zh-... 阅读全文
posted @ 2013-03-23 11:55 沙影无痕 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 设置ios 图标右上角数字方法:int number = 0;[UIApplicationsharedApplication].applicationIconBadgeNumber = number; 阅读全文
posted @ 2013-03-21 15:19 沙影无痕 阅读(297) 评论(0) 推荐(0) 编辑
摘要: (1)在一些开发中需要向服务器上传带有参数的URL request,参数中免不了会有中文字符,含有中文字符的URL是没法直接传送出去的,需要经过UTF8编码。然而在经过UTF8编码以后,上传到服务器的中文参数都产生了乱码;这里使用的是ASIHTTPRequest;(2)解决方案,替换ASIHTTPR... 阅读全文
posted @ 2013-03-16 10:52 沙影无痕 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1 setValue: forKey:的定义@interface NSMutableDictionary(NSKeyValueCoding)/* Send -setObject:forKey: to the receiver, unless the value is nil, in which ca... 阅读全文
posted @ 2013-03-13 09:08 沙影无痕 阅读(137) 评论(0) 推荐(0) 编辑
摘要: #import CAGradientLayer *gradient = [CAGradientLayer layer];gradient.frame = rect;gradient.colors = [NSArray arrayWithObjects:(id)[UIColor blackColor]... 阅读全文
posted @ 2013-02-28 17:11 沙影无痕 阅读(147) 评论(0) 推荐(0) 编辑
摘要: - (UILocalNotification*) createLocalNotificationWithContent:(NSString*) content{ UILocalNotification *notification=[[[UILocalNotification alloc] in... 阅读全文
posted @ 2013-02-25 09:21 沙影无痕 阅读(154) 评论(0) 推荐(0) 编辑