随笔分类 -  IOS开发

摘要:http://yuedu.baidu.com/ebook/6f6c3b1ef01dc281e43af000?pn=1&rf=http%3A%2F%2Fyuedu.baidu.com%2Febook%2F6f6c3b1ef01dc281e43af000 阅读全文
posted @ 2015-07-29 21:01 有容乃大 阅读(533) 评论(0) 推荐(0) 编辑
摘要:使用Reachability检测网络状态,很简单! 阅读全文
posted @ 2012-08-01 09:38 有容乃大 阅读(55889) 评论(1) 推荐(2) 编辑
摘要:IOS播放视频代码,本人亲测! 阅读全文
posted @ 2012-07-20 13:33 有容乃大 阅读(613) 评论(0) 推荐(0) 编辑
摘要:10款iOS高效开发必备的Objective-C类库,开必IOS必须的! 阅读全文
posted @ 2012-07-20 11:35 有容乃大 阅读(715) 评论(0) 推荐(0) 编辑
摘要:在 iPhone 应用里,有时我们想强行把显示模式从纵屏改为横屏(反之亦然),CocoaChina 会员 “alienblue” 为我们提供了两种思路 阅读全文
posted @ 2012-07-18 13:14 有容乃大 阅读(25504) 评论(0) 推荐(1) 编辑
摘要:IOS设备屏幕旋转相关技术收集... 阅读全文
posted @ 2012-07-17 16:13 有容乃大 阅读(1625) 评论(0) 推荐(0) 编辑
摘要:不过在obj-c中有二个与之接近的概念"非正式协议(interface)"与"正式协议(protocal)"。非正式协议在obj-c中的关键字虽然也是interface,但是这个跟c#中的接口(interface)并不完全相同。 阅读全文
posted @ 2012-07-17 11:10 有容乃大 阅读(2017) 评论(0) 推荐(0) 编辑
摘要:MPMoviePlayerController 与AVAudioPlayer有点类似,前者播放视频,后者播放音频,不过也有很大不同,MPMoviePlayerController 可以直接通过远程URL初始化,而AVAudioPlayer则不可以。不过大体上用起来感觉差不多。废话少说进入体验。 阅读全文
posted @ 2012-07-13 16:54 有容乃大 阅读(685) 评论(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 有容乃大 阅读(3293) 评论(0) 推荐(0) 编辑
摘要:cpuid.1.eax = "0000:0000:0000:0001:0000:0110:1010:0101" 阅读全文
posted @ 2012-07-11 21:02 有容乃大 阅读(163) 评论(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 有容乃大 阅读(1492) 评论(0) 推荐(0) 编辑
摘要:IOS对plist配置文件的读写操作 阅读全文
posted @ 2012-07-06 15:46 有容乃大 阅读(12491) 评论(0) 推荐(0) 编辑
摘要:AVAudioPlayer播放音频 阅读全文
posted @ 2012-07-03 13:36 有容乃大 阅读(1580) 评论(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 有容乃大 阅读(239) 评论(0) 推荐(0) 编辑
摘要:1. 数据类型。int %ofloat %fcouble %char %c2.实例变量作用域的指令:@protected 实例变量可被该类及任何子类中定义的方法直接访问(默认的情况)。@private 实例变量可被定义在该类的方法直接访问,不能被子类定义的方法直接访问。@public 实例变量可被... 阅读全文
posted @ 2012-06-30 10:41 有容乃大 阅读(2075) 评论(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 有容乃大 阅读(9258) 评论(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 有容乃大 阅读(11813) 评论(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 有容乃大 阅读(381) 评论(0) 推荐(0) 编辑
摘要://软件信息[[UIDevice currentDevice] systemName];//系统名字[[UIDevice currentDevice] systemVersion];//系统版本号[[UIDevice currentDevice] uniqueIdentifier];//[[UIDevice currentDevice] model]; //设备型号[[UIDevice currentDevice] name];// 硬件信息[UIDevice platform];//平台[UIDevice cpuFrequency]];//cpu信息UIDevice busFrequency 阅读全文
posted @ 2012-06-27 14:37 有容乃大 阅读(2732) 评论(0) 推荐(0) 编辑
摘要:mac 终端 常用命令基本命令1、列出文件ls 参数 目录名例:看看驱动目录下有什么:ls /System/Library/Extensions参数 -w 显示中文,-l 详细信息, -a 包括隐藏文件2、转换目录cd例:想到驱动目录下溜达一圈cd /System/Library/Extensions3、建立新目录mkdir 目录名例:在驱动目录下建一个备份目录 backupmkdir /System/Library/Extensions/backup在桌面上建一个备份目录 backupmkdir /User/用户名/Desktop/backup4、拷贝文件cp 参数 源文件 目标文件例:想把 阅读全文
posted @ 2012-06-11 18:37 有容乃大 阅读(960) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示