xcode 将quartzcore 添加到Xcode 4 for iOS
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6956432/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Adding quartzcore to Xcode 4 for iOS
提问by Crafti
I have troubles installing quartzcore on Xcode 4 regarding an iOS application. I just can't find the answer: how to do it? Because when I try to add Quartzcore to the targets of the project, it seems I can only add a Mac OS X framework. All you can do about an iOS framework is creating one.
我在 Xcode 4 上安装关于 iOS 应用程序的quartzcore 时遇到了麻烦。我就是找不到答案:怎么做?因为当我尝试将 Quartzcore 添加到项目的目标时,我似乎只能添加一个 Mac OS X 框架。您对 iOS 框架所能做的就是创建一个。
回答by foslock
In Xcode 4, in the left sidebar, select the project file at the top:
在 Xcode 4 中,在左侧边栏中,选择顶部的项目文件:
1) Make sure your target is selected in the main view, and you should see 5 tabs at the top,
1) 确保在主视图中选择了您的目标,您应该在顶部看到 5 个选项卡,
2) Click the "Build Phases" tab,
2) 单击“构建阶段”选项卡,
3) Click the arrow to the left of the "Link Binary With Libraries" row,
3) 单击“Link Binary With Libraries”行左侧的箭头,
4) Click the plus button that just appeared at the bottom of that row,
4) 单击刚刚出现在该行底部的加号按钮,
5) Type "QuartzCore" into the search field,
5) 在搜索栏中输入“QuartzCore”,
6) You should see a folder named "iOS 4.3" with the "QuartzCore.framework" inside of it,
6) 您应该会看到一个名为“iOS 4.3”的文件夹,其中包含“QuartzCore.framework”,
7) Double click the "QuartzCore.framework" to add it to your current project.
7) 双击“QuartzCore.framework”将其添加到您当前的项目中。
Then it should appear in left sidebar, and you can drag it into the frameworks folder if you wish.
然后它应该出现在左侧边栏中,如果你愿意,你可以将它拖到框架文件夹中。
Make sure you do a
确保你做一个
#import <QuartzCore/QuartzCore.h>
in any source files that you use the framework.
在您使用该框架的任何源文件中。
If you don't see the framework when you search for it, it means you don't have the SDK installed correctly. You probably want to reinstall Xcode at that point.
如果搜索时没有看到该框架,则说明您没有正确安装SDK。此时您可能想要重新安装 Xcode。
回答by Durai Amuthan.H
I was also experiencing the same problem and I figured that out without reinstalling the xcodeand sdk
我也遇到了同样的问题,我在没有重新安装 xcode和sdk 的情况下就解决了这个问题
Steps:
脚步:
Downloadand unzipthe compressed QuartzCore.frameworkfrom here
Openyour project clickon any of the available frameworkand choose show in finder
Pastethe QuartzCore.framework found in the unzipped file there.
Clickthe project and then targetand then link libraries and frameworkfrom buildphases
Click plusand then type the Quartzin the upcoming pop up
从这里下载并解压压缩的QuartzCore.framework
打开您的项目,单击任何可用的框架并选择在 finder 中显示
将解压文件中的 QuartzCore.framework粘贴到那里。
单击项目,然后定位,然后从构建阶段链接库和框架
单击加号,然后在即将出现的弹出窗口中键入Quartz
There you go.That's it.
给你。就是这样。
References:
参考: