Quote:
Originally Posted by nanshi
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.