2015年1月23日

Core Data使用之一(Swift): 获取

摘要: //获取entity中的数据 func fetchFiles() { //第一步,获取总代理 let appDelegate = UIApplication.sharedApplication().delegate as AppDelegate //第二步,获取对象管... 阅读全文

posted @ 2015-01-23 22:24 大木哥 阅读(364) 评论(0) 推荐(0) 编辑

Core Data使用之一(Swift): 保存

摘要: Core Data 用于永久化数据,它是基于SQLite数据库的保存一门技术。那么,在Swift中,它是如何实现的呢?首先,需要新建一个模板,打开工程中的xcdatamodeld文件,点击“Add Entity” ,这时候,就创建的一个模板。之后,可以修改模板的名称为自己想要的名称。然后,在Attr... 阅读全文

posted @ 2015-01-23 21:14 大木哥 阅读(503) 评论(0) 推荐(0) 编辑

Swift 添加到TableView实现动画效果

摘要: let indexPath = NSIndexPath(forRow:0 ,inSection:0)self.tableView.insertRowsAtIndexPaths([indexPath], withRowAnimation: UITableViewRowAnimation.Automat... 阅读全文

posted @ 2015-01-23 00:19 大木哥 阅读(463) 评论(0) 推荐(0) 编辑

导航