LGDrawer 1.0.2

LGDrawer 1.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Nov 2015

Maintained by Grigory Lutkov.



LGDrawer 1.0.2

  • By
  • Grigory Lutkov

iOS helper draws UIImages programmatically. It contains collection of different images like rectangle, triangle, ellipse, plus, minus, cross, line, tick, arrow, heart, star and others. You can customize a lot of parameters like size of image area, size of image, background color, fill color, stroke type and color, rotation, shadows and others. Also you can combine different images into one image.

Preview

Installation

With source code

Download repository, then add LGDrawer directory to your project.

Podfile

platform :ios, '6.0'
pod 'LGDrawer', '~> 1.0'

Cartfile

github "Friend-LGA/LGDrawer" ~> 1.0

Usage

In the source files where you need to use the library, import the header file:

#import "LGDrawer.h"

Draw

For example how to draw rectangle:

UIImage *rectangle = [LGDrawer drawRectangleWithImageSize:CGSizeMake(90.f, 90.f)
                                                     size:CGSizeMake(60.f, 60.f)
                                                   offset:CGPointZero
                                                   rotate:0.f
                                           roundedCorners:UIRectCornerBottomLeft|UIRectCornerTopRight
                                             cornerRadius:10.f
                                          backgroundColor:[UIColor whiteColor]
                                                fillColor:[UIColor blueColor]
                                              strokeColor:[UIColor blackColor]
                                          strokeThickness:2.f
                                               strokeDash:@[@4.f, @2.f] // first - length of line, second - length of space | you can use more arguments in array
                                               strokeType:LGDrawerStrokeTypeCenter
                                              shadowColor:[UIColor colorWithWhite:0.f alpha:0.5]
                                             shadowOffset:CGPointMake(2.f, 2.f)
                                               shadowBlur:6.f]

More

For more details try Xcode Demo project and see LGDrawer.h

License

LGDrawer is released under the MIT license. See LICENSE for details.