【iOS】Illegal Configuration: The Label outlet from the ViewController to the UILabel is invalid. Outlets cannot be connected to repeating content.

报错:Illegal Configuration: The Label outlet from the ViewController to the UILabel is invalid. Outlets cannot be connected to repeating content.

产生原因:tableview里面的label是动态的,而用storyboard那样拖动绑定过来的outlet是静态的,所以不能采用这种方法来绑定。应该采用如下方法:

首先给label设置一个Tag,比如105

snip20161208_198

然后在代码中使用viewWithTag的方法访问:

【iOS】Swift3. XCode8使用SQLite3时报错:Apple Mach-O Linker Error “_sqlite3_exec”, referenced from: “_sqlite_open”, referenced from: “_sqlite3_prepare_v2”, referenced from

报错:Apple Mach-O Linker Error “_sqlite3_exec”, referenced from: “_sqlite_open”, referenced from: “_sqlite3_prepare_v2”, referenced from “_sqlite3_column_count” referenced From:

snip20161203_89

点击项目名称 – Linked Frameworks and Libraries – “+” – 搜索“libsqlite3.dylib” – 然后点击Add

snip20161202_59 snip20161202_62