摘要:ios 开发中 动态库 与静态库的区别使用静态库的好处1,模块化,分工合作2,避免少量改动经常导致大量的重复编译连接3,也可以重用,注意不是共享使用动态库使用有如下好处:1使用动态库,可以将最终可执行文件体积缩小2使用动态库,多个应用程序共享内存中得同一份库文件,节省资源3使用动态库,可以不重新编译...
阅读全文
摘要://获取entity中的数据 func fetchFiles() { //第一步,获取总代理 let appDelegate = UIApplication.sharedApplication().delegate as AppDelegate //第二步,获取对象管...
阅读全文
摘要:Core Data 用于永久化数据,它是基于SQLite数据库的保存一门技术。那么,在Swift中,它是如何实现的呢?首先,需要新建一个模板,打开工程中的xcdatamodeld文件,点击“Add Entity” ,这时候,就创建的一个模板。之后,可以修改模板的名称为自己想要的名称。然后,在Attr...
阅读全文
摘要:let indexPath = NSIndexPath(forRow:0 ,inSection:0)self.tableView.insertRowsAtIndexPaths([indexPath], withRowAnimation: UITableViewRowAnimation.Automat...
阅读全文
摘要:var alert = UIAlertController(title: "", message: "", prefferedStyle: UIAlertControllerStyle.Alert)//添加按钮let oneAction = UIAlertAction(title: "", styl...
阅读全文
摘要:var str_componets = "I Like Swift "str_componets.componentsSeparatedByString(" ")这样,str_componets分成了四部分:["I", "Like", "Swift", ""]也可以用NSCharacterSet进行...
阅读全文
摘要:var str_trim = " !hi !23 !"str_trim.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())//"!hi !23 !"去掉两边的空格str_trim.stringByTr...
阅读全文