使用了一段時間CocoaPods來管理Objective-c的類庫,方便了不少。但是有一個小問題,當我在xcode輸入import關鍵字的時候,沒有自動聯想補齊代碼的功能,需要手工敲全了文件名,難以適應。
在stackoverflow上找到了解決辦法:
Go to the Target > ”Build Settings” tab and find the ”User Header Search Paths” setting.
Set this to ”$(BUILT_PRODUCTS_DIR)” and check the ”Recursive” check box.
Now the built target will search the workspace’s shared build directory to locate the linkable header files.
簡單說就是這么幾步:
選擇Target -> Build Settings 菜單,找到User Header Search Paths設置項
新增一個值"${SRCROOT}",并且選擇Recursive,這樣xcode就會在項目目錄中遞歸搜索文件
自動補齊功能馬上就好使了。