2017-04-12 102 views
1

裏面我已經建立了Xcode中我自己的框架項目,我想使用的方法從其他框架(例如:libA.framework)我的框架項目中。ios9:調用另一個框架框架項目

和我崩潰,並顯示無法識別的錯誤,當我運行使用的方法從libA.framework,我試圖從libA.framework但不成立檢查裏面headerA.h方法,但它成立於headerA+Standalone.h

是什麼headerA.hheaderA+Standalone.h之間的區別? 如何調用headerA+Standalone.h裏面的方法?

回答

0

headerA+Standalone.hheaderA.h,其延伸的headerA.h功能的category extension

只需簡單地添加#import <FRAMEWORK_NAME/headerA+Standalone.h>(如果這一頭位於)。然後,你將能夠使用內部headerA+Standalone.h

+0

我想在我的框架項目創建類只是用於測試和它的工作職能。但是當我的框架在'libA.framework'中調用'headerA + Standalone.h'時崩潰了。我已經導入'headerA + Standalone.h',但仍然是相同的 – victorz

+0

您是否在'libA.framework'中將'headerA + Standalone.h'作爲公共頭文件?如果沒有,那就這樣做。並且在你正在調用的'headerA + Standalone.h'上添加該方法。 –

+0

'headerA + Standalone.h'是'libA.framework'中的公共頭文件,我的框架可以調用'headerA.h'中的方法,但不能調用'headerA + Standalone.h'中的方法,我不知道爲什麼。 – victorz