On Twitter @ZacH0lland asked for some button resources he could use in one of his apps. I thought it might be a good idea to share these buttons with all of you. The buttons are made with Adobe Fireworks. The download also contains a Corona SDK project, which serves as a short tutorial on how to use the button graphics in your iOS or Android app.

Corona SDK Buttons

Notes On The Lua Code

When you make your own apps, please use the current version of the ui.lua module. You can find this file on the Ansca Mobile website or in some sample apps which ship with Corona SDK.

Notes On the Fireworks Project

The Adobe Fireworks file TheHardestButtonToButton.fw.png includes the four sample buttons. Each button has two states: normal and tapped.

You can export the png files from Adobe Fireworks with File > Export > Layers to Files. The Fireworks file includes the retina graphics (640×960) only. If you need to support non-retina displays, you can use the prepareImages.sh script to convert the graphics. For the script to work you need ImageMagick installed on your machine.

Use the graphics in your own projects, may these be commercial or non-commercial.

I would love to hear from you when you use the buttons in any way. So drop me a line in the comments or contact me via Twitter.



This post will show you how you can quickly switch between different Corona projects. Furthermore, you will learn how you can switch between simulated devices quickly.

The Corona SDK Simulator

The Corona SDK comes with a simulator. During development you will use it a lot, especially when you develop for different target platforms. Corona can simulate these devices:

  • iPhone
  • iPhone4
  • iPad
  • Droid
  • Nexus One
  • myTouch
  • Galaxy Tab

Per default the simulator is installed in /Applications/CoronaSDK/Corona Simulator.app. You can use the Corona Simulator App to try the examples which come with Corona. However, when you develop your app, you should start the simulator as described below.

Simulator Script

Corona SDK Simulator Settings

Corona installs also a shell script for your convenience: /Applications/CoronaSDK/simulator. This is needed to start the simulator from within Terminal. This has the great advantage that you will see the error messages while you test your app.

When you start the simulator through the simulator command you can pass in a skin and a project. With the skin option you tell Corona which device it should simulate. With the project option you tell Corona which project you want to open in the simulator.

Simulator Shortcuts

If you want to switch between simulated devices quickly it is convenient to have some shortcuts in place. Add these lines to your .bashrc file:

# Corona SDK Settings
export PATH=/Applications/CoronaSDK/:$PATH
export CORONA_PROJECTS=~/projects/corona
alias coronasim='simulator -project $(dirname $(find $CORONA_PROJECTS -type f -name \*.lua -print0 | xargs -0 ls -t | head -n 1))'
alias iphone='coronasim -skin iPhone'
alias ipad='coronasim -skin iPad'
alias iphone4='coronasim -skin iPhone4'

The .bashrc file can be found in your home directory. Please be aware that normally you cannot see files in Finder which start with a dot. These will be hidden by Finder. Therefore, we open the file with the following command in Terminal:

open /Applications/TextEdit.app ~/.bashrc

This will start the TextEdit app and open the .bashrc file automatically. Make the changes and then save.

Please, do not forget to adopt the CORONA_PROJECTS path to your needs. I store all of my Corona projects in one folder called ~/projects/corona. Only the projects beneath the CORONA_PROJECTS folder will be found by the new command aliases.

When you added the above lines issue this command in Terminal to make the changes to your .bashrc file effective: . ~/.bashrc

Now you can try to run the simulator with the simple command iphone. This will automatically open the last project you were working on by looking at the modification date of the .luafiles found in the folder CORONA_PROJECTS.

If you need to switch to a different simulated device you can go to Terminal and enter control-c to stop the running simulator. Then start a new simulator session with, for example, ipad.

Code, follow me on Twitter, subscribe to my RSS feed, and then relax.


Sailing the Seas of Cheese – Week 35

September 3, 2011

My weekly recap of work and procrastination. Links iPhone vs Android App Sales 21 Ways to Monetize Your Game App Development – The Marketing Lua Style Guide Why Markdown Markdown Service Tools Vim Snippets for Lua and Corona SDK Snippets Vim List all buffers. :ls Vim Search and replace in all buffers. :bufdo %s/pattern/replace/gc | […]

Read the full article →

Vim Snippets for Corona SDK and Lua Development

August 31, 2011

In my last post I showed you [how to set up Vim for Corona SDK development]. The environment I described in it has a lot of room for improvement. One of these is code snippets. This post will show you how to add Corona SDK and Lua code snippets to the Vim editor. How to […]

Read the full article →

Sailing the Seas of Cheese – Week 34

August 30, 2011

My weekly recap of work and procrastination.[1] Links Stanford Engineering Everywhere 29 Ways to Stay Creative Your Problem with Vim is that you don’t Grok vi iOS 5: Phasing out Developer Access to the UDID New Visual Proportions for the iOS User Interface Using the Corona Debugger Snippets Terminal Print the calendar week (week number) […]

Read the full article →

Corona SDK Meets Vim

August 27, 2011

Using Vim for Corona SDK development is really a good option. Here are the tips you need to use Vim together with Corona. Syntax Coloring When you use a recent version of Vim (> 7.x) it should support syntax highlighting for Lua 5.1out of the box. You can download a Vim syntax file for Lua, […]

Read the full article →

A Complete Game Made with Corona SDK – Tutorial Part 4

August 24, 2011

Welcome back to the last part of the Corona SDK tutorial series. You might want to consider reading part one, part two, and part three first. In this part of the programming tutorial we will add the game logic, a menu, and the sound. The Code and Assets Before we go through the code, download […]

Read the full article →

How to Watermark Images with ImageMagick

August 20, 2011

Watermarking your images is one significant component of building your brand on the Internet. In the post How to Brand Your WordPress Images with Pixelmator’s Watermark Action I described how you can watermark your images with the excellent Pixelmator application. But the workflow is limited and has some drawbacks: Small images get upscaled, which results […]

Read the full article →

Easily Install Free Software on Mac OS X with MacPorts

August 19, 2011

There are lots of great open source software packages available for free. Installing these is sometimes a really hard task. MacPorts greatly simplifies the compiling and installing of open-source software on your Mac. You do not have to download any source code and compile it yourself. Just let MacPorts install the software for you. Lots […]

Read the full article →

How to Brand Your WordPress Images with Pixelmator’s Watermark Automator Action

August 17, 2011

Branding is an important aspect of a successful blog. Watermarking your images and videos can help in creating that brand. I use watermarking not so much to protect my images from content theft as to facilitate branding. How you Can Automatically Resize and Watermark your Images with Pixelmator Resizing and watermarking your images manually is […]

Read the full article →