上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 19 下一页
摘要: MPMoviePlayerController 与AVAudioPlayer有点类似,前者播放视频,后者播放音频,不过也有很大不同,MPMoviePlayerController 可以直接通过远程URL初始化,而AVAudioPlayer则不可以。不过大体上用起来感觉差不多。废话少说进入体验。 阅读全文
posted @ 2012-07-13 16:54 有容乃大 阅读(677) 评论(0) 推荐(0) 编辑
摘要: 目前Xcode 4.2 Preview版也已经发布,据说其修改方法跟4.1非常类似,只改动了一行代码,请参看参考文章的第二篇。本文仍以4.1版本为例。 更新:现在Xcode 4.2正式版和iOS 5均已发布,下面补充上4.2的修改方法。(2011-10-24) 各步骤会标明版本,比如(Xcode4.1请执行)和(Xcode4.2请执行),4.2.1的修改方法与4.2完全相同 未标明的步骤为两个版本均需执行的步骤! 阅读全文
posted @ 2012-07-13 13:57 有容乃大 阅读(3285) 评论(0) 推荐(0) 编辑
摘要: cpuid.1.eax = "0000:0000:0000:0001:0000:0110:1010:0101" 阅读全文
posted @ 2012-07-11 21:02 有容乃大 阅读(160) 评论(0) 推荐(0) 编辑
摘要: //16进制颜色(html颜色值)字符串转为UIColor+(UIColor *) hexStringToColor: (NSString *) stringToConvert{ NSString *cString = [[stringToConvert stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] uppercaseString]; // String should be 6 or 8 characters if ([cString length] ... 阅读全文
posted @ 2012-07-07 12:19 有容乃大 阅读(1490) 评论(0) 推荐(0) 编辑
摘要: IOS对plist配置文件的读写操作 阅读全文
posted @ 2012-07-06 15:46 有容乃大 阅读(12480) 评论(0) 推荐(0) 编辑
摘要: AVAudioPlayer播放音频 阅读全文
posted @ 2012-07-03 13:36 有容乃大 阅读(1577) 评论(0) 推荐(1) 编辑
摘要: - (NSString *)title { return [[title retain] autorelease];}- (void)setTitle:(NSString *)newTitle { if (title != newTitle) { [title release]; title = [newTitle retain]; }} 阅读全文
posted @ 2012-06-30 10:43 有容乃大 阅读(232) 评论(0) 推荐(0) 编辑
摘要: // 初始化锁对象ticketCondition = [[NSCondition alloc] init];//开始第一个线程。ticketsThreadone = [[NSThread alloc] initWithTarget:self selector:@selector(run) object:nil];[ticketsThreadone setName:@"Thread-1"];[ticketsThreadone start];//开始第二个线程。ticketsThreadtwo = [[NSThread alloc] initWithTarget:self se 阅读全文
posted @ 2012-06-30 10:38 有容乃大 阅读(9251) 评论(0) 推荐(0) 编辑
摘要: UILabel *label = [[ UILabel alloc] init];label.text = @"xxx";label.frame = CGRectMake(0,0,100,100) ;label.backgroundColor = [UIColor redColor];//添加事件。label.userInteractionEnabled = YES;UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector( 阅读全文
posted @ 2012-06-30 10:36 有容乃大 阅读(11788) 评论(0) 推荐(0) 编辑
摘要: NSLog的定义 NSLog定义在NSObjCRuntime.h中,如下所示: void NSLog(NSString *format, …); 基本上,NSLog很像printf,同样会在console中输出显示结果。不同的是,传递进去的格式化字符是NSString的对象,而不是chat *这种字符串指针。 示例 NSLog可以如下面的方法使用: NSLog (@"this is a test"); NSLog (@"string is :%@", string); NSLog (@"x=%d, y=%d", 10, 20); 但是 阅读全文
posted @ 2012-06-29 13:43 有容乃大 阅读(375) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 19 下一页