Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/honcheng/Paint-App
Custom UIView subclass to enable a drawing overlay in iOS
https://github.com/honcheng/Paint-App
Last synced: 3 months ago
JSON representation
Custom UIView subclass to enable a drawing overlay in iOS
- Host: GitHub
- URL: https://github.com/honcheng/Paint-App
- Owner: honcheng
- Fork: true (oflannabhra/Paint-App)
- Created: 2011-12-07T02:49:38.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2011-12-07T06:19:50.000Z (about 13 years ago)
- Last Synced: 2023-03-11T09:16:35.246Z (almost 2 years ago)
- Language: Objective-C
- Size: 1.19 MB
- Stars: 7
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
- awesome - Paint-App - Custom UIView subclass to enable a drawing overlay in iOS (etc)
- awesome - Paint-App - Custom UIView subclass to enable a drawing overlay in iOS (etc)
README
This is an app that tracks touches in a custom subclass of UIView (called CanvasView) and draws them by implementing the - drawrect method. This view is positioned on top of a sample background image and is transparent.
Paths are added to an NSMutableArray to allow functionality for undo. It is currently limited to Line objects, although other shapes are perfectly able to be implemented.
Future Plans:
- Refactor the drawing code to perform better. The current implementation draws both the current line and all previous lines every time touches change. This could be much more efficient by using Layers to only draw the current line (and popping layers for undo functionality).
- Expand the types of shapes to draw. Make Line a subclass of a Shape class to allow for custom shape drawing.
- Implement pop-up notes.Feel free to expand the functionality to meet your needs. This is a very simple implementation that was done as an exercise.