04 2012 档案
摘要:要使用core data,首先要得到NSManagedObjectContext之前看过斯坦福2011年冬的公开课程视频,介绍过有2种方法得到1.为通过UIManagedDocument2.是在AppDelegate中定义@property第一种方法较为容易,不过只支持IOS5或以上版本先在要使用core data的UIViewController中定义UIManagedDocument的@property然后通过以下代码片段建立 NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirect...
阅读全文
摘要:原来要用IOS的Table不一定建立UITableViewController直接在UIViewController上就建立UITabelView就可以当然要也要在.h中添加<UITableViewDelegate,UITableViewDataSource>以下部分代码片段- (void)viewDidLoad{ [super viewDidLoad]; myTableView=[[UITableView alloc] initWithFrame:CGRectMake(0, 43, 320, 480)]; [myTableView setDelegate:self]...
阅读全文