Sgraffito iPhone Application

Sgraffito iPhone Application

Sgraffito iPhone Drawing App

Version 2.1 now out… Much better than any other…

I have just finished and uploaded my latest little test project to Apple Review. Sgraffito.

Apple accepted the app, after 15 days.

The app is now at version 2.1, which has a great deal of content added from 1.5, which was much better than 1.0 (obviously).

Download it now for free on the app-store.

Sgraffito - Scott Rapson

It is a simple drawing app, based around a black background. There is a settings page with RGB sliders and brush slider, and preset colours for the sliders. Shaking the device calls the clearing of the ‘canvas’.

Screenshot 2010.11.25 23.09.20.png

Planned features for later release include:

Fading the default loading image out. This is difficult though, because there are 3 different images which are based on device and rotation state.

More textures and colour presets

Import texture from camera roll

Undo perhaps? But I really don’t know how to implement it.

Photo Jan 15, 1 10 19 PM.jpg

What I learned during the development of Sgraffito

During the course of development, I learnt several new things with Sgraffito, being my first published native app (not first app published, or first native app though) including:

I needed to use image files under my canvas to ‘scratch away at’. My engine was based on UIColor, so I used the following method to get it working.

[UIColor colorWithPatternImage:[UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"picture.png"]]];

If an image is too small to fit, the OS will tile the image over the screen, and this technique can be used to make backgrounds from small image files. If a image is too large, it continues off the screen. To allow for different OS’s, I use a if{} else{} for iPad and iPhone screen sizes. I could enhance that with further if{} if{} else{} else{} for rotation also, but its not worth it for my application.

Xcode’s problems with submitting an app with icon files that are wrong, even though they perfectly fine.
This error was:

“Icon specified in the Info.plist not found under the top level app wrapper: icon.png”

This was resolved by renaming the icon files in the resources folder to xicon.ong etc, cleaning all targets, and then renaming them to Icon.png etc. This solved that particular publish time issue.

The second issue was the code sign being invalid. I was sure that it was correct, and off the project settings indicated that it was setup correctly. After googling for an hour or so, i found that there is another settings menu under Project > Edit Active Target. This was different to the other project settings menus for some reason, and fixed the problem. After working with Universal Applications, this layout makes more sense, with multiple target settings.

These errors are not massive, but they really shouldn’t exist, the icon issue was caused by xcode not accepting the metadata for the icons. This data should be checked and changed during the development process, not accepted everywhere until submission. This is an issue, and needs to be fixed by Apple, hopefully this can be rectified by the XCode 4 release.

More documentation regarding the devices and their capabilities with the armv6 and armv7 architectures would be good… It seems armv7 is for 3rd gen devices and above, but to support older devices, both are needed. This causes a warning if targeting for iPad, that armv6 should be left out.

Devlog:

Version 2.2

As of now, unreleased, but should have the following

New slider buttons and rails that greatly reduce space and make more sense

Redesigned credits menu

Added a welcome message for first time users

Cleaned up the art files etc for slightly reduced file size (this is regained by new slider art)

Added a popover on the colour sliders for iPad, indicating the value of selected slider colour.

Some other small iPad related improvements with the UI and credits menu transition.

Framework for a new colour picker for iPad only. May introduce one for iPod if I can figure out an elegant way of presenting it to the user.

Version 2.1

Cleaned up some drawing code to increase performance.

Other/Misc. Added Flurry tracking so I can see how the app is used

Removed the gradient that is shown when overscrolling the help text.

Added a nice new transition from the loading screen to the canvas for iPhone/Touch users

Improved rotation performance.

Added a check for higher performance devices like iPad and new iPhone/iPods, and run some new drawing engine code for marginally smoother lines. This feature will be developed more over time.

Version 2.0

Major changes to the drawing engine, better performance etc

Modified interface

Camera roll export

TVOut support on all iPad’s running OS4.2 or higher

Added TenOne Store

More texture stuff, optimisations etc

Version 1.6

Bug Fixes and framework building/optimising

Version 1.5

Can’t remember. more textures?

Version 1.4

Can’t remember… Maybe some textures?

Version 1.3

iOS4 native multitasking on both iPhones, iPods and iPads running iOS4

Rewrote the colour framework to give more options later down the track for custom textures.

Added colour picker with white, gray, black, red, orange, yellow and 3 ‘textured’ brushes. These brushes are dark and light gradients and a canvas texture. These ‘textures look best with larger brushes.

Added a dedicated credits and help page. (Tap on the ? on the settings menu to bring it up.

Removed website link and version number from settings page. These can be viewed on the help/credits page.

Changed the transitions between the different pages.

Reduced average CPU usage when drawing. Drawing should be more responsive now on iPhone/iPods and iPad.

Fixed memory leak

Fixed a bug that was causing a rare crash on older devices.

Other misc bug fixes that affected older devices. These are tricky to remove


Version 1.2

Added universal application support

Fully Retina Capable

Added full rotation support

Added full VoiceOver support

New loading screens

Optimised drawing at fast speeds

Squashed some small performance bugs regarding the transition between the canvas and settings windows.

Version 1.1

Fixed the status bar showing up where it was not meant to.

Version 1.0

Initial release. Basic drawing tool, with settings for colour, brush thickness and black/white colour presets. Clear all button and website button are also present on the settings page, and shaking prompts a clear of the screen.

Scott