【发布时间】:2012-08-26 21:26:50
【问题描述】:
我的问题可能措辞不正确,但我不确定我所问的是否 100%,所以这里是:-)
在 Xcode 中,您可以在头文件中的 @interface 上方设置 @class(类名)。 这与更改类名称中的 UIViewController 相同吗?见以下代码:
这也是一样吗-
@class CoreDataClass;
@interface FlipsideViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>
{
}
//This file declares the UITableView
@property (nonatomic, retain) IBOutlet UITableView *mainTableView;
@property (nonatomic, retain) CoreDataClass *cdc;
这样:
@interface FlipsideViewController : CoreDataClass <UITableViewDataSource, UITableViewDelegate>
{
}
//This file declares the UITableView
@property (nonatomic, retain) IBOutlet UITableView *mainTableView;
@property (nonatomic, retain) NSManagedObjectContext *managedObjectContext;
@end
??
如果这不一样,它有什么不同,不同的实现有什么优势?
只有真正询问它们是否相似:-)
【问题讨论】:
标签: objective-c ios class implementation