使用了一段時(shí)間CocoaPods來管理Objective-c的類庫,方便了不少。但是有一個(gè)小問題,當(dāng)我在xcode輸入import關(guān)鍵字的時(shí)候,沒有自動(dòng)聯(lián)想補(bǔ)齊代碼的功能,需要手工敲全了文件名,難以適應(yīng)。
在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設(shè)置項(xiàng)
新增一個(gè)值"${SRCROOT}",并且選擇Recursive,這樣xcode就會(huì)在項(xiàng)目目錄中遞歸搜索文件
自動(dòng)補(bǔ)齊功能馬上就好使了。