
iphone
cjopengler
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
headfirst iphone编程中 第一张label文字无法变换
为什么按照书中的代码 是无法变换的?下载了书中示例代码,经过研究发现,改成如下,才能成功:@interface iDecideViewController :UIViewController { UILabel *decisionText;}原创 2011-09-05 12:02:29 · 584 阅读 · 0 评论 -
object-c get开头的函数名是什么意思
get 在 Cocoa 中有特殊含义,The word “get” has a special meaning in Cocoa: in a Cocoa method name, it means the method returns a value via a pointe原创 2011-10-18 14:39:00 · 1709 阅读 · 0 评论 -
UISplitViewController 只能用在最开始的 window.rootViewController
白忙活一个下午,本想使用一个 按钮 然后开启一个 UISplitViewController 界面,等到看了apple的 文档后 彻底醒悟,那是不可能的。A split view controller must always be the root of any原创 2011-10-09 17:16:12 · 2168 阅读 · 2 评论 -
object-c NSString 和 NSMutableString区别
NSString相当于一个const char* 不可以改变。而 NSMutableString相当于 char* 可以改变内部的内容。NSArray创建的是不可改变的数组,也就是其个数不可改变,不能增加也不能减少。NSMutableArray可以用来动态改变数组内容原创 2011-09-15 15:07:08 · 1739 阅读 · 0 评论 -
self.memeber 和 memeber调用 产生的异同
#import #import "A.h"@interface B : NSObject { A* m_a; }@property (nonatomic, retain) A* m_a;- (void) test;@end#import原创 2011-09-28 22:22:28 · 1107 阅读 · 2 评论 -
UIButton 创建
UIButton创建 不能使用 UIButton alloc,因为这样UIButton 的Style是无法设置的。所以UIButton只有一种创建方法 [UIButtonbuttonWithType:UIButtonTypeRoundedRect]原创 2011-10-14 16:57:19 · 1150 阅读 · 0 评论 -
NSIndexPath UITableView移动到下一个行
UITableView 返回的当前行是 NSIndexPath 怎么移动到下一行呢?1。 直接调用没有这样的函数,所以只能获取当前indexPath的 indeces,这个就是IndexPath的本质数据。这里indeces是使用的 C array方式存放的 (文档是这么写的原创 2011-09-27 14:41:17 · 3167 阅读 · 0 评论 -
xcode object-c unrecognized selector错误解析
unrecognized selector原来是这样的 是该object中没有定义这个函数。例如 [A Release] 就会缠上这个crash 异常,因为A并没有 Release方法,有的只是 release方法。看来和 其他语言不太一样啊,其他语言是编译时候就会失原创 2011-09-07 16:28:08 · 1306 阅读 · 0 评论 -
xcode4 中并非所有的Referencing Outles都是从File's Owner中得到
如题。当你的IBOutlet声明在delegate中的时候,他会从 app delegate中找到。也就是第三个黄色的立方体图标。headfirst iphone 第7章的那个 tableviewcontroller要从这里找。原创 2011-09-09 16:06:20 · 1170 阅读 · 0 评论 -
iphone 编程中 tableview 不要忘记 reloadData
如题。否则,会发现数据居然没有更新。原创 2011-09-14 13:15:17 · 1367 阅读 · 0 评论 -
xcode 4 设置 core data的当前模型 current model
1 选中最顶层的那个比如 sample.xcdatamodeld。一定是最顶层的。2 在inspector 中就会看到 versioned datamodel 选择当前的就可以了。原创 2011-09-14 21:33:29 · 1287 阅读 · 0 评论 -
object-c用+来表示类方法,相当于声明为static
如题原创 2011-09-15 15:00:06 · 943 阅读 · 0 评论 -
object-c 类别
类别的作用:1 能够使较大的类 分散 便于管理。2 能够增加新的函数执行。3 使用类别创建私有方法。就是 创建类别 声明以及实现都在 .m文件中即可。4 非正式协议类别的限制:1 不能够增加新的成员变量。2 小心名字冲突。所以新定义的要查SDK确定。原创 2011-09-16 17:41:12 · 1043 阅读 · 0 评论 -
object-c 内存管理
一 关于set函数- void setA: (A*) pa{//pa 有了新的所有者 所以要先 增加引用计数[pa retain];//该类中的数据成员a 原先所指的内存要释放 否则 会内存泄露[a release];//最后才能将 a 赋值成 p原创 2011-09-15 18:17:09 · 1510 阅读 · 0 评论 -
xcode 工程 sdk missing 问题的解决
http://mobile.51cto.com/iphone-280381.htm看这里就可以了。主要是在 build setting 中 修改转载 2011-09-17 19:19:46 · 961 阅读 · 0 评论 -
no such table: Z_METADATA ios sqlite 3 问题解析
这个问题已经搞清楚了。国外对这个问题讨论了好多,具体的可以参考 http://ablogontech.wordpress.com/2009/07/13/using-a-pre-populated-sqlite-database-with-core-data-on-ipho原创 2011-09-19 23:33:41 · 3266 阅读 · 0 评论 -
object-c c case语句中的报错 Unexpected interface name 'NSArray': expected expression
例如int a = 2;switch (a){ case 1: NSArray* array = [[NSArray alloc] init]; [array release]; break; case 2:原创 2011-09-29 13:22:15 · 6273 阅读 · 2 评论