Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-28-2011, 03:49 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 3
nanshi is on a distinguished road
Question how to import photoshop mockups into interface builder?

there are images, buttons etc in the mockup, i wonder if there is a way to import files generated by photoshop (say *psd) directly into the interface builder of an iphone app project?
nanshi is offline   Reply With Quote
Old 09-28-2011, 04:47 PM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

No. PSD files aren't supported. You need to save them in a supported image format first, like PNG, Jpeg etc.
baja_yu is offline   Reply With Quote
Old 09-28-2011, 09:38 PM   #3 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by nanshi View Post
there are images, buttons etc in the mockup, i wonder if there is a way to import files generated by photoshop (say *psd) directly into the interface builder of an iphone app project?
You can save an entire screen as a PNG and import that as a background image for a window. You generally want to leave out the buttons and add them as separate objects. Photoshop layers are your friend in a situation like this, because you can add or remove elements as needed, or save individual layers as separate PNG images which you then import into the control you are customizing.

For things like buttons, make sure you're working in a layered document. Carefully select the area you want and cut it into a separate layer. Then create a new document (The new document should default to the size of the image in the clipboard.) create a new layer and paste in your button. Hide the background layer so the area around the button is transparent. Then save as a PNG file with mask.

You can use such an image as a button image directly, and the system will draw the title on top of it.

It's also possible, although tricky, to create stretchable button background images that will resize to fit the button size automatically. Do a search on "StretchableImage" to find the UIImage method that handles that. That takes a lot of fiddling with pixels to get it to look right.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 09-30-2011, 07:41 AM   #4 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 3
nanshi is on a distinguished road
Smile

Thank u for the quick reply. I still wonder if there is some easy tool to use to convert a *.psd file into *.png images according to the layers. I did find a tool on windows to convert a *.psd file into a single image, but i dont see it can separate layers.
nanshi is offline   Reply With Quote
Old 09-30-2011, 09:54 AM   #5 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 194
mavrik5150 is on a distinguished road
Default

Quote:
Originally Posted by nanshi View Post
Thank u for the quick reply. I still wonder if there is some easy tool to use to convert a *.psd file into *.png images according to the layers. I did find a tool on windows to convert a *.psd file into a single image, but i dont see it can separate layers.
I don't use Photoshop that often but that's what I thought the Slice Tool was for, you create the slices around the pieces that you want to be separate images and then I believe you use Save for Web Devices and then you would get a folder with all the different images you cut out of the original.
mavrik5150 is offline   Reply With Quote
Old 09-30-2011, 05:25 PM   #6 (permalink)
Registered Member
 
Join Date: Mar 2011
Posts: 36
Punkjumper is on a distinguished road
Default

in photoshop you can export all your layers to a separate file by going to the file menu/scrips/export layers to file then choose your file type.

do you not have photoshop? you don't need any special tools to flatten a multi layered file.
Punkjumper is offline   Reply With Quote
Reply

Bookmarks

Tags
interface builder, photoshop mock, xcode 4

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 385
16 members and 369 guests
13dario13, 7twenty7, eski, EvilElf, glenn_sayers, HemiMG, iOS.Lover, jarv, LunarMoon, n00b, pbart, Pudding, sacha1996, Sami Gh, UMAD, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,672
Threads: 94,122
Posts: 402,906
Top Poster: BrianSlick (7,990)
Welcome to our newest member, yuncarl28
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:20 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0