Archive for February, 2011

Cheap Graphics Editing for iOS Apps: icons

Rather than focus on totally free, this time I’m talking a paid, but totally worth the money application.

Art Text by BeLight Software is a cheap application that can give you the glossy, 3D icons and text you expect in an iPhone app with fairly little effort. (Apple Mac App Store link: id404180306)

There is no replacement for a graphic artist, but sometimes you need to make things yourself for practical reasons. And this little app can build some nice little icons that you can use (without embarrassment.)

I’m sorry that I don’t have much time to finish this post, so I’m resorting to some shorthand to list the things I like about this app for iPhone development:

  • You can make your graphics a specific size and fit things to that size.
  • It maintains layers and transparencies nicely.
  • Text and shapes can be filled with color, 3D effects, or images.
  • 3D effects can have multiple light sources. Light sources can be rotated in each item.
  • Shadows and strokes are easy.
  • Can save to PDF for full vector size changes.

Most of all,  with this little app, I can make an icon that looks decent in a few minutes.  If I tried the same thing in Photoshop or Pixelmator, I’d be working for hours to get the same look.

Free Graphics Editing for iOS Apps: Text

How much of graphics need can I solve with the free apps that come with the Macintosh?  A challenge I had to take up recently when I did not have my trusty laptop and software.

There are of course free downloadable apps out there, but it should still be worthwhile to find a way.

I needed some text on a clear background.  If needed text on a colored background, it would be easy to make it in TextEdit and just take a screen shot.  An application that can do text and  can save as a PNG file can handle this, but what in the standard Mac apps will do it?  Preview. Apple’s free application for viewing images and PDF files. (Surprised? I was.)

Preview’s menus won’t just make a new file, except to paste what was copied into the clipboard. But you can make files of any size easily.  Just start with a bigger file and crop it down (or resize it).  Or, take a screen shot of something with the Mac’s screen capture and use that.  Command-shift-3 is good, but Command-Shift-4 will let you select any part of the monitor while showing you the resulting size.  It can be helpful to capture and image of the layout you want to put the text into. Then you can fit it right the first time.

If you don’t want to accidentally change your base file, make a copy of it in Finder first. Or use Preview’s “Save As” to set the new file and its location.

To get a clear background in Preview, select all or part of the image and hit the delete key.  Poof! Transparent background.

To get text into your file, start by showing the annotations toolbar. You can:

  • Click the “Annotate” button.
  • Use the menu View -> “Show Annotations Toolbar”
  • Use Tools -> Annotate -> “Add Text”

Drag out a text box and layout your text. You can’t set a shadow on the text, but you can do most other kinds of simple text editing.

CAUTION: when you save, all annotation item become images. Preview doesn’t really do layers even though it will keep separate items until you save (none of the formats saved layer information for me. If it does, please tell me.)

If you need layering in the originals to make changes easier, you’ll need a different program. For Preview, you can make new images by pasting original text from another source.

Opening the Inspector will tell you many things about your file. The right-most tab (pencil icon) will let you set colors and other attributes of the annotation items. There’s more, but perhaps that’s for another post.

Enjoy

Quick Tip for Mac VNC

Have you found the Mac’s built-in “Screen Sharing” application?  But you are a bit tired of going through the motions of typing the address, then username and password? Have you noticed that “Screen Sharing” won’t save a file with the destination?

Go to Safari and type the URL,  “vnc://targetComputer” and press return.  Safari will start “Screen Sharing” and make it open the connection to targetComputer.   Now you can drag the URL icon out to the desktop.  If you double-click that icon, screen sharing starts up and connects to the server.

You can add usernames and port numbers like this:   “vnc://username@targetComputer:portnumber”

Quick and Easy.

Enjoy

Re-ordering arguments in a format string.

Here’s a point I had to dig out while trying the “positional specifiers” from the “String Programming Guide”.

I was creating strings using “stringWithFormat” and needed to change a string being sent to a server and wanted to avoid changing code if possible.  But after many tries at changing parameters to things like “%2$@,  %3$@”, the result was not changing.

It turned out that for re-ordering to work, you must use all of the arguments supplied in the method call. I was trying to leave out argument 1 (on purpose) and that caused the order numbering to be ignored.

Since my result was XML,  I just put the unneeded string into an XML comment at the end of the result and that worked.

(I have not tried to find out what happens if I use an argument more than once.  But I have seen that giving less arguments than in the format string can make an app crash.)