“咳咳.......” ?CC 又上線了哦案糙!今天花30分鐘把剩下的文檔介紹翻譯一下铃在!不喜勿噴!不過可以指出CC的錯誤之處哦庭砍!留言或者私信給我都可以哦~~~~ CC看到會及時更正的哦性置!
Adding the static library to your iOS project(添加靜態(tài)庫到iOS項目中)
Note: if you want to use this in a Swift project, you need to use the steps in the "Adding this as a framework" section instead of the following. Swift needs modules for third-party code.
(注意:如果你現在將CPUImage使用在Swift 項目拾并,你需要使用“Adding this as a framework”這章的步驟。Swift需要使用第三方代碼)
Once you have the latest source code for the framework, it's fairly straightforward to add it to your application. Start by dragging the GPUImage.xcodeproj file into your application's Xcode project to embed the framework in your project. Next, go to your application's target and add GPUImage as a Target Dependency. Finally, you'll want to drag the libGPUImage.a library from the GPUImage framework's Products folder to the Link Binary With Libraries build phase in your application's target.
一旦你有了框架的最新源代碼鹏浅,將其添加到應用程序中就相當簡單了嗅义。首先拖動GPUImage.xcodeproj到你的應用程序的Xcode項目嵌入框架在你的項目中。接下來隐砸,去你的應用程序的目標和添加GPUImage作為Target的依賴之碗。最后,你要把libGPUImage.a靜態(tài)庫季希。添加到從GPUImage框架的產品Link Binary With Libraries build phase在你的項目中继控。
GPUImage needs a few other frameworks to be linked into your application, so you'll need to add the following as linked libraries in your application target:
GPUImage需要一些其他的框架被連接到你的應用程序,所以您需要添加以下鏈接庫應用程序中的目標:
1.CoreMedia
2.CoreVideo
3.OpenGLES
4.AVFoundation
5.QuartzCore
You'll also need to find the framework headers, so within your project's build settings set the Header Search Paths to the relative path from your application to the framework/ subdirectory within the GPUImage source directory. Make this header search path recursive.
你還需要找到框架的頭文件胖眷,所以在項目GPUImage源目錄應用程序的生成設置頭文件搜索路徑的framework/ subdirectory。使這個頭文件搜索路徑遞歸霹崎。
To use the GPUImage classes within your application, simply include the core framework header using the following:
在你的應用中使用GPUImage類珊搀,僅包括使用以下核心框架頭文件:
#import "GPUImage.h"
As a note: if you run into the error "Unknown class GPUImageView in Interface Builder" or the like when trying to build an interface with Interface Builder, you may need to add -ObjC to your Other Linker Flags in your project's build settings.
作為一個提示:如果你遇到錯誤“Unknown class GPUImageView in Interface Builde(未知類GPUImageView在界面生成”或類似于試圖用界面生成器生成界面,您可能需要add -ObjC to your Other Linker Flags在項目的生成設置中尾菇。
Also, if you need to deploy this to iOS 4.x, it appears that the current version of Xcode (4.3) requires that you weak-link the Core Video framework in your final application or you see crashes with the message "Symbol not found: _CVOpenGLESTextureCacheCreate" when you create an archive for upload to the App Store or for ad hoc distribution. To do this, go to your project's Build Phases tab, expand the Link Binary With Libraries group, and find CoreVideo.framework in the list. Change the setting for it in the far right of the list from Required to Optional.
另外境析,如果你需要部署到iOS 4.X系統,看來派诬,Xcode的當前版本(4.3)要求你weak-link的Core Video框架劳淆,最終的應用程序或您看到崩潰日志“Symbol not found: _CVOpenGLESTextureCacheCreate:“當你創(chuàng)建上傳到App Store或廣告組織分布的檔案。要做到這一點默赂,去你的項目Build Phases tab沛鸵,擴大the Link Binary With Libraries group,并在列表中找到CoreVideo.framework缆八。在列表右側的設置將必選修改為可選曲掰。
Additionally, this is an ARC-enabled framework, so if you want to use this within a manual reference counted application targeting iOS 4.x, you'll need to add -fobjc-arc to your Other Linker Flags as well.
此外,這是一個ARC-enabled框架奈辰,所以如果你想用這個在手動引用計數的應用針對iOS 4栏妖。X,你需要add -fobjc-arc在你其他的鏈接標志中奖恰。
Building a static library at the command line(在命令行中構建靜態(tài)庫)
If you don't want to include the project as a dependency in your application's Xcode project, you can build a universal static library for the iOS Simulator or device. To do this, runbuild.shat the command line. The resulting library and header files will be located atbuild/Release-iphone. You may also change the version of the iOS SDK by changing theIOSSDK_VERvariable inbuild.sh(all available versions can be found usingxcodebuild -showsdks).
如果你不想引入的項目作為依賴在你的應用的Xcode項目中吊趾,您可以為iOS模擬器或設備建立一個通用的靜態(tài)庫宛裕。要做到這一點,在命令行runbuild.shat论泛。生成的庫和頭文件將位于atbuild/Release-iphone中揩尸。你也可以通過改變build.sh的IOSSDK_VER變量改變iOS SDK版本(所有可用的版本可以找到并使用xcodebuild - showsdks)
今天的翻譯時間結束哦!30分鐘到了~~~So!我又要準備新課題去咯~~~????
小伙伴們閱讀后孵奶,請喜歡一下疲酌。文章更新可以提醒到你哦~~~~
我是CC ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?QQ號:1776094879
喜歡手動點個喜歡吧!
可以持續(xù)關注CC老師哦了袁!留言你想學習的課題朗恳,我就會給你寫一個專題哦!
當然载绿,你也可以給日以繼夜粥诫,明明可以靠臉卻非得靠實力的CC老師打賞一個!U赣埂怀浆!給CC老師打賞個面膜錢吧!
關注CC,特立獨行的女開發(fā)-> 講師怕享。把自己的熱血执赡、灑脫、文藝青年的心灑滿課堂函筋;不甘心當講師沙合,致力成為網紅;寫的了代碼跌帐,耍的了“流氓”的 CC老師