-
Notifications
You must be signed in to change notification settings - Fork 18
Home
Welcome to the Painter wiki!
The Painter app turns the iPhone screen into a virtual canvas.
The user paints by dragging one or more fingers across the screen. (OK!)
The line color and thickness can be set by touching the info button in the lower-right corner of the screen. (OK!)
The control panel includes a slider for line width and red, green and blue sliders for line color. (OK!)
As the Line Width slider is moved from left to right, the width of the line increases. (OK!)
At the bottom of the screen, two buttons allow the user to turn a finger into an eraser or clear the screen entirely. (OK!)
At any point while painting, the user can shake the iPhone to clear the entire drawing from the screen. (OK!)
##Build Requirements:
SDK iOS 4.0 above with Xcode
##Runtime Requirements: SDK iOS 4.0 above with iOS Simulator
##Packaging List
- Main View Controller: The main page for the painter.
- Squiggle: An object help with drawing.
- Main View: Then main view for drawing event, handle the main drawing.
- Flipside View Controller: The view for setting the color and line width.
- Version 1.0
- Color drawing fine, fixed issues passing attributes' value.
- Color drawing fine, fixed issues passing attributes' value.
Copyright (C) 1992-2009 by Deitel & Associates, Inc. All rights reserved
From this Painter app, we can learn about how to custom UIViewController and FlipsideViewController. How to handle all three types of touch events, along with motion events generated when the user shakes the iPhone. Also can see how to store primitives and structures in collections user the NSValue class, and how to selectively redraw a UIView to optimize the app's performance.