摘要: //jindian *nextController = [[jindian alloc] initWithNibName:@"jindian" bundle:nil];改成,jindian *nextController = [[jindian alloc] init]; 阅读全文
posted @ 2012-07-14 18:00 zander 阅读(291) 评论(0) 推荐(0)
摘要: cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;cell.accessoryType = UITableViewCellAccessoryNone; 没有 阅读全文
posted @ 2012-07-14 16:20 zander 阅读(644) 评论(0) 推荐(0)
摘要: // 从数据库删除数据 //1. 数据库删除 [context deleteObject:classToDelete]; //2. 本地删除 不本地删除不行 [self.listremoveObjectAtIndex:row]; NSError *error = nil; if (![context save:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); //exit(-1); 出现异常 推出程序一般不是用exit 函数 因为使用他会使用户感觉 系统.. 阅读全文
posted @ 2012-07-14 15:25 zander 阅读(149) 评论(0) 推荐(0)
摘要: UIAlertView *alert =[[UIAlertViewalloc] initWithTitle:@"You tap the buton,boy!" message: [NSString stringWithFormat:@"%@",buttonTitle] delegate:nil cancelButtonTitle: @"OK." otherButtonTitles: nil]; [alert show]; [alert release]; 阅读全文
posted @ 2012-07-14 12:54 zander 阅读(137) 评论(0) 推荐(0)
摘要: 众所周知,当从导航页面进入下一个页面时,导航栏的左侧会自动生成一个item其标题为上个页面的title,有时候我们想改变左侧item的标题,其实现的方法如下:在第一个页面://设置后退的 backBarButton bar back UIBarButtonItem *backItem = [[UIBarButtonItemalloc] init]; backItem.title = @"Back"; self.navigationItem.backBarButtonItem=backItem; [backItem release]; 阅读全文
posted @ 2012-07-14 10:27 zander 阅读(267) 评论(0) 推荐(0)
摘要: 1。今天打开项目奇怪只有.h和.m文件解决办法:新创建一个class 勾选 同时添加.xib文件 项目中的其他文件就显示出来了 奇了怪了2。今天xcode中的文件不知道什么时候没有了就只剩下一两个 奇了怪了 解决办法同上。。。。。。。。是不是人品有问题??? 阅读全文
posted @ 2012-07-14 10:06 zander 阅读(2238) 评论(1) 推荐(0)
摘要: //navigation添加右侧可编辑或者删除按钮 UIBarButtonItem *editButton = [[UIBarButtonItemalloc ] initWithTitle:@"Delete" style:UIBarButtonItemStyleBordered target:self action:@selector(toggleEdit:)]; self.navigationItem.rightBarButtonItem = editBut... 阅读全文
posted @ 2012-07-14 09:54 zander 阅读(242) 评论(0) 推荐(0)
摘要: AppDelegate *appDelegate =[[UIApplicationsharedApplication] delegate]; NSManagedObjectContext *context = [appDelegate managedObjectContext]; //classes NSEntityDescription *entityDescriptionForClass = [NSEntityDescription entityForName:@"ClassEntity" inManagedObjectContext:context]; NSFetch 阅读全文
posted @ 2012-07-14 09:29 zander 阅读(233) 评论(0) 推荐(0)