BKDoodleView is a drawing view for iOS applications. You can change the color, opacity, and size of the brush.
You can directly add the BKDoodleView.h
and BKDoodleView.m
source files to your project.
- Download the latest code version or add the repository as a git submodule to your git-tracked project.
- Open your project in Xcode, than drag and drop
BKDoodleView.h
andBKDoodleView.m
onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project. - Include BKDoodleView wherever you need it with
#import "BKDoodleView.h"
.
You can create a BKDoodleView in the following ways:
+ (id)doodleView;
+ (id)doodleViewWithFrame:(CGRect)frame;
//Add a background image to draw on
- (void)setBackgroundImage:(UIImage*)backgroundImage contentMode:(UIViewContentMode)contentMode;
//Set RGBA values
- (void)setRed:(CGFloat)red blue:(CGFloat)blue green:(CGFloat)green alpha:(CGFloat)alpha;
//Set brush size
- (void)setBrushSize:(CGFloat)size;
//Set frame
- (void)setFrame:(CGRect)frame;
This code is distributed under the terms and conditions of the MIT license.
Version 0.1 @ 4/1/13
- Initial release