如何在 xCode 中使用 Photoshop PSD 设计文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6980048/
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
How to use the Photoshop PSD design file in your xCode?
提问by Ramon Wang
I'm going to creat an iOS app from UI design to implementation, I want to make my app looks better, so i googled a lot and find people saying to create a PSD file with your app views first, so here comes to my question:
我要创建一个从 UI 设计到实现的 iOS 应用程序,我想让我的应用程序看起来更好,所以我用谷歌搜索了很多,发现有人说先用你的应用程序视图创建一个 PSD 文件,所以我的问题来了:
1) If i had that PSD file, how do i use it in my app?
1) 如果我有那个 PSD 文件,我如何在我的应用程序中使用它?
2) Is there a general way to use that PSD file for all the elements I created?
2) 有没有一种通用的方法可以将该 PSD 文件用于我创建的所有元素?
Thank you very much.
非常感谢。
回答by Henrik P. Hessel
The PSD File contains your photoshop readable source material and cannot be used in your iOS application. You have to export / save your PDF files save a PNG or jpeg to use it.
PSD 文件包含您的 Photoshop 可读源材料,不能在您的 iOS 应用程序中使用。您必须导出/保存您的 PDF 文件并保存为 PNG 或 jpeg 才能使用它。
回答by ehanna
You will need to do some slicing, i.e. divide the interface described in the PSD into smaller PNG images.
您将需要进行一些切片,即将 PSD 中描述的界面划分为较小的 PNG 图像。
You will probably need
你可能需要
- The designer who made the PSD.
- Adobe Photoshop.
- 制作 PSD 的设计师。
- Adobe Photoshop。
These are the broad steps that you need to take.
这些是您需要采取的广泛步骤。
The designer needs to tell you what each element of his design is supposed to do.
As a developer you will need to decide how each element is going into your app (Button, Label, image, table)
Pick out the components you need for each element (outline, fill, shadow, etc)
Choose the corresponding layers,in the PSD, to those components.
save those layers for web(Choose PNG-24, keep transparency)
设计师需要告诉你他设计的每个元素应该做什么。
作为开发人员,您需要决定每个元素如何进入您的应用程序(按钮、标签、图像、表格)
为每个元素挑选您需要的组件(轮廓、填充、阴影等)
在 PSD 中为这些组件选择相应的层。
将这些图层保存为网络(选择 PNG-24,保持透明度)
回答by Tal Zion
You can export the PSD elements to XCode using a photoshop script. this is easy and simple. All you need to do is follow the steps and it will import the files to your .storyboard file.
您可以使用 photoshop 脚本将 PSD 元素导出到 XCode。这很简单。您需要做的就是按照步骤操作,它会将文件导入到您的 .storyboard 文件中。