- (instancetype)initWithTitle:(NSString *)title message:(NSString *)message buttonTitles:(NSArray *)buttonTitles cancelButtonTitle:(NSString *)cancelButtonTitle destructiveButtonTitle:(NSString *)destructiveButtonTitle;
- (instancetype)initWithViewStyleWithTitle:(NSString *)title message:(NSString *)message view:(UIView *)view buttonTitles:(NSArray *)buttonTitles cancelButtonTitle:(NSString *)cancelButtonTitle destructiveButtonTitle:(NSString *)destructiveButtonTitle;
- (instancetype)initWithActivityIndicatorStyleWithTitle:(NSString *)title message:(NSString *)message buttonTitles:(NSArray *)buttonTitles cancelButtonTitle:(NSString *)cancelButtonTitle destructiveButtonTitle:(NSString *)destructiveButtonTitle;
- (instancetype)initWithActivityIndicatorStyleWithTitle:(NSString *)title message:(NSString *)message buttonTitles:(NSArray *)buttonTitles cancelButtonTitle:(NSString *)cancelButtonTitle destructiveButtonTitle:(NSString *)destructiveButtonTitle;
- (instancetype)initWithActivityIndicatorStyleWithTitle:(NSString *)title message:(NSString *)message buttonTitles:(NSArray *)buttonTitles cancelButtonTitle:(NSString *)cancelButtonTitle destructiveButtonTitle:(NSString *)destructiveButtonTitle;
@property (assign, nonatomic) id<LGAlertViewDelegate> delegate; - (void)alertViewWillShow:(LGAlertView *)alertView; - (void)alertViewWillDismiss:(LGAlertView *)alertView; - (void)alertViewDidShow:(LGAlertView *)alertView; - (void)alertViewDidDismiss:(LGAlertView *)alertView; - (void)alertView:(LGAlertView *)alertView buttonPressedWithTitle:(NSString *)title index:(NSUInteger)index; - (void)alertViewCancelled:(LGAlertView *)alertView; - (void)alertViewDestructiveButtonPressed:(LGAlertView *)alertView;
@property (strong, nonatomic) void (^willShowHandler)(LGAlertView *alertView); @property (strong, nonatomic) void (^willDismissHandler)(LGAlertView *alertView); @property (strong, nonatomic) void (^didShowHandler)(LGAlertView *alertView); @property (strong, nonatomic) void (^didDismissHandler)(LGAlertView *alertView); @property (strong, nonatomic) void (^actionHandler)(LGAlertView *alertView, NSString *title, NSUInteger index); @property (strong, nonatomic) void (^cancelHandler)(LGAlertView *alertView, BOOL onButton); @property (strong, nonatomic) void (^destructiveHandler)(LGAlertView *alertView);
kLGAlertViewWillShowNotification; kLGAlertViewWillDismissNotification; kLGAlertViewDidShowNotification; kLGAlertViewDidDismissNotification;
/** Default is YES */ @property (assign, nonatomic, getter=isCancelOnTouch) BOOL cancelOnTouch; /** Set highlighted buttons background color to blue, and set highlighted destructive button background color to red. Default is YES */ @property (assign, nonatomic, getter=isColorful) BOOL colorful; @property (strong, nonatomic) UIColor *tintColor; @property (strong, nonatomic) UIColor *coverColor; @property (strong, nonatomic) UIColor *backgroundColor; @property (assign, nonatomic) CGFloat layerCornerRadius; @property (strong, nonatomic) UIColor *layerBorderColor; @property (assign, nonatomic) CGFloat layerBorderWidth; @property (strong, nonatomic) UIColor *layerShadowColor; @property (assign, nonatomic) CGFloat layerShadowRadius; @property (assign, nonatomic) CGFloat heightMax; @property (assign, nonatomic) CGFloat widthMax; @property (strong, nonatomic) UIColor *titleTextColor; @property (assign, nonatomic) NSTextAlignment titleTextAlignment; @property (strong, nonatomic) UIFont *titleFont; @property (strong, nonatomic) UIColor *messageTextColor; @property (assign, nonatomic) NSTextAlignment messageTextAlignment; @property (strong, nonatomic) UIFont *messageFont; @property (strong, nonatomic) UIColor *buttonsTitleColor; @property (strong, nonatomic) UIColor *buttonsTitleColorHighlighted; @property (assign, nonatomic) NSTextAlignment buttonsTextAlignment; @property (strong, nonatomic) UIFont *buttonsFont; @property (strong, nonatomic) UIColor *buttonsBackgroundColorHighlighted; @property (assign, nonatomic) NSUInteger buttonsNumberOfLines; @property (assign, nonatomic) NSLineBreakMode buttonsLineBreakMode; @property (assign, nonatomic) BOOL buttonsAdjustsFontSizeToFitWidth; @property (assign, nonatomic) CGFloat buttonsMinimumScaleFactor; @property (strong, nonatomic) UIColor *cancelButtonTitleColor; @property (strong, nonatomic) UIColor *cancelButtonTitleColorHighlighted; @property (assign, nonatomic) NSTextAlignment cancelButtonTextAlignment; @property (strong, nonatomic) UIFont *cancelButtonFont; @property (strong, nonatomic) UIColor *cancelButtonBackgroundColorHighlighted; @property (assign, nonatomic) NSUInteger cancelButtonNumberOfLines; @property (assign, nonatomic) NSLineBreakMode cancelButtonLineBreakMode; @property (assign, nonatomic) BOOL cancelButtonAdjustsFontSizeToFitWidth; @property (assign, nonatomic) CGFloat cancelButtonMinimumScaleFactor; @property (strong, nonatomic) UIColor *destructiveButtonTitleColor; @property (strong, nonatomic) UIColor *destructiveButtonTitleColorHighlighted; @property (assign, nonatomic) NSTextAlignment destructiveButtonTextAlignment; @property (strong, nonatomic) UIFont *destructiveButtonFont; @property (strong, nonatomic) UIColor *destructiveButtonBackgroundColorHighlighted; @property (assign, nonatomic) NSUInteger destructiveButtonNumberOfLines; @property (assign, nonatomic) NSLineBreakMode destructiveButtonLineBreakMode; @property (assign, nonatomic) BOOL destructiveButtonAdjustsFontSizeToFitWidth; @property (assign, nonatomic) CGFloat destructiveButtonMinimumScaleFactor; @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle; @property (strong, nonatomic) UIColor *activityIndicatorViewColor; @property (strong, nonatomic) UIColor *progressViewProgressTintColor; @property (strong, nonatomic) UIColor *progressViewTrackTintColor; @property (strong, nonatomic) UIImage *progressViewProgressImage; @property (strong, nonatomic) UIImage *progressViewTrackImage; @property (strong, nonatomic) UIColor *progressLabelTextColor; @property (assign, nonatomic) NSTextAlignment progressLabelTextAlignment; @property (strong, nonatomic) UIFont *progressLabelFont; @property (strong, nonatomic) UIColor *separatorsColor; @property (assign, nonatomic) UIScrollViewIndicatorStyle indicatorStyle;
- (void)showAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)dismissAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler;
- (instancetype)initWithTitle:(NSString *)title buttonTitles:(NSArray *)buttonTitles cancelButtonTitle:(NSString *)cancelButtonTitle destructiveButtonTitle:(NSString *)destructiveButtonTitle;
- (instancetype)initWithTitle:(NSString *)title view:(UIView *)view buttonTitles:(NSArray *)buttonTitles cancelButtonTitle:(NSString *)cancelButtonTitle destructiveButtonTitle:(NSString *)destructiveButtonTitle;
@property (assign, nonatomic) id<LGActionSheetDelegate> delegate; - (void)actionSheetWillShow:(LGActionSheet *)actionSheet; - (void)actionSheetWillDismiss:(LGActionSheet *)actionSheet; - (void)actionSheetDidShow:(LGActionSheet *)actionSheet; - (void)actionSheetDidDismiss:(LGActionSheet *)actionSheet; - (void)actionSheet:(LGActionSheet *)actionSheet buttonPressedWithTitle:(NSString *)title index:(NSUInteger)index; - (void)actionSheetCancelled:(LGActionSheet *)actionSheet; - (void)actionSheetDestructiveButtonPressed:(LGActionSheet *)actionSheet;
@property (strong, nonatomic) void (^willShowHandler)(LGActionSheet *actionSheet); @property (strong, nonatomic) void (^willDismissHandler)(LGActionSheet *actionSheet); @property (strong, nonatomic) void (^didShowHandler)(LGActionSheet *actionSheet); @property (strong, nonatomic) void (^didDismissHandler)(LGActionSheet *actionSheet); @property (strong, nonatomic) void (^actionHandler)(LGActionSheet *actionSheet, NSString *title, NSUInteger index); @property (strong, nonatomic) void (^cancelHandler)(LGActionSheet *actionSheet, BOOL onButton); @property (strong, nonatomic) void (^destructiveHandler)(LGActionSheet *actionSheet);
kLGActionSheetWillShowNotification; kLGActionSheetWillDismissNotification; kLGActionSheetDidShowNotification; kLGActionSheetDidDismissNotification;
@property (assign, nonatomic) LGActionSheetTransitionStyle transitionStyle; /** Default is YES */ @property (assign, nonatomic, getter=isCancelOnTouch) BOOL cancelOnTouch; /** Set highlighted buttons background color to blue, and set highlighted destructive button background color to red. Default is YES */ @property (assign, nonatomic, getter=isColorful) BOOL colorful; @property (strong, nonatomic) UIColor *tintColor; @property (strong, nonatomic) UIColor *coverColor; @property (strong, nonatomic) UIColor *backgroundColor; @property (assign, nonatomic) CGFloat layerCornerRadius; @property (strong, nonatomic) UIColor *layerBorderColor; @property (assign, nonatomic) CGFloat layerBorderWidth; @property (strong, nonatomic) UIColor *layerShadowColor; @property (assign, nonatomic) CGFloat layerShadowRadius; @property (assign, nonatomic) CGFloat heightMax; @property (assign, nonatomic) CGFloat widthMax; @property (strong, nonatomic) UIColor *titleTextColor; @property (assign, nonatomic) NSTextAlignment titleTextAlignment; @property (strong, nonatomic) UIFont *titleFont; @property (strong, nonatomic) UIColor *buttonsTitleColor; @property (strong, nonatomic) UIColor *buttonsTitleColorHighlighted; @property (assign, nonatomic) NSTextAlignment buttonsTextAlignment; @property (strong, nonatomic) UIFont *buttonsFont; @property (strong, nonatomic) UIColor *buttonsBackgroundColorHighlighted; @property (assign, nonatomic) NSUInteger buttonsNumberOfLines; @property (assign, nonatomic) NSLineBreakMode buttonsLineBreakMode; @property (assign, nonatomic) BOOL buttonsAdjustsFontSizeToFitWidth; @property (assign, nonatomic) CGFloat buttonsMinimumScaleFactor; @property (strong, nonatomic) UIColor *cancelButtonTitleColor; @property (strong, nonatomic) UIColor *cancelButtonTitleColorHighlighted; @property (assign, nonatomic) NSTextAlignment cancelButtonTextAlignment; @property (strong, nonatomic) UIFont *cancelButtonFont; @property (strong, nonatomic) UIColor *cancelButtonBackgroundColorHighlighted; @property (assign, nonatomic) NSUInteger cancelButtonNumberOfLines; @property (assign, nonatomic) NSLineBreakMode cancelButtonLineBreakMode; @property (assign, nonatomic) BOOL cancelButtonAdjustsFontSizeToFitWidth; @property (assign, nonatomic) CGFloat cancelButtonMinimumScaleFactor; @property (strong, nonatomic) UIColor *destructiveButtonTitleColor; @property (strong, nonatomic) UIColor *destructiveButtonTitleColorHighlighted; @property (assign, nonatomic) NSTextAlignment destructiveButtonTextAlignment; @property (strong, nonatomic) UIFont *destructiveButtonFont; @property (strong, nonatomic) UIColor *destructiveButtonBackgroundColorHighlighted; @property (assign, nonatomic) NSUInteger destructiveButtonNumberOfLines; @property (assign, nonatomic) NSLineBreakMode destructiveButtonLineBreakMode; @property (assign, nonatomic) BOOL destructiveButtonAdjustsFontSizeToFitWidth; @property (assign, nonatomic) CGFloat destructiveButtonMinimumScaleFactor; @property (strong, nonatomic) UIColor *separatorsColor; @property (assign, nonatomic) UIScrollViewIndicatorStyle indicatorStyle;
- (void)showAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)dismissAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler;
ViewController *viewController = [ViewController new]; UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; window.rootViewController = navigationController;
ViewController *viewController = [ViewController new]; UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; LGSideMenuController *sideMenuController = [[LGSideMenuController alloc] initWithRootViewController:navigationController]; window.rootViewController = sideMenuController;
[sideMenuController setLeftViewEnabledWithWidth:250.f // presentationStyle:LGSideMenuPresentationStyleScaleFromBig // alwaysVisibleOptions:0]; //
TableViewController *leftViewController = [TableViewController new]; [sideMenuController.leftView addSubview:leftViewController.tableView];
- (void)showLeftViewAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)hideLeftViewAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)showHideLeftViewAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)showRightViewAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)hideRightViewAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)showHideRightViewAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler;
kLGSideMenuControllerWillShowLeftViewNotification; kLGSideMenuControllerWillDismissLeftViewNotification; kLGSideMenuControllerDidShowLeftViewNotification; kLGSideMenuControllerDidDismissLeftViewNotification; kLGSideMenuControllerWillShowRightViewNotification; kLGSideMenuControllerWillDismissRightViewNotification; kLGSideMenuControllerDidShowRightViewNotification; kLGSideMenuControllerDidDismissRightViewNotification;
- (instancetype)initWithView:(UIView *)view numberOfButtons:(NSUInteger)numberOfButtons showsPlusButton:(BOOL)showsPlusButton;
@property (assign, nonatomic) id<LGPlusButtonsViewDelegate> delegate; - (void)plusButtonsView:(LGPlusButtonsView *)plusButtonsView buttonPressedWithTitle:(NSString *)title description:(NSString *)description index:(NSUInteger)index; - (void)plusButtonsViewPlusButtonPressed:(LGPlusButtonsView *)plusButtonsView;
@property (strong, nonatomic) void (^actionHandler)(LGPlusButtonsView *plusButtonView, NSString *title, NSString *description, NSUInteger index); @property (strong, nonatomic) void (^plusButtonActionHandler)(LGPlusButtonsView *plusButtonView);
@property (assign, nonatomic, getter=isShowWhenScrolling) BOOL showWhenScrolling; @property (strong, nonatomic) LGPlusButton *plusButton; /** First is plusButton */ @property (strong, nonatomic) NSMutableArray *buttons; /** First is plusButton description */ @property (strong, nonatomic) NSMutableArray *descriptions; @property (assign, nonatomic) UIEdgeInsets contentInset; @property (assign, nonatomic) UIEdgeInsets buttonInset; @property (assign, nonatomic) CGSize buttonsSize; @property (assign, nonatomic) CGSize plusButtonSize; /** Description horizontal offset from button, default is 6.f */ @property (assign, nonatomic) CGFloat descriptionOffsetX; @property (assign, nonatomic) LGPlusButtonsAppearingAnimationType appearingAnimationType; @property (assign, nonatomic) LGPlusButtonsAppearingAnimationType buttonsAppearingAnimationType; @property (assign, nonatomic) LGPlusButtonAnimationType plusButtonAnimationType; @property (assign, nonatomic) LGPlusButtonsViewPosition position; - (void)setButtonsTitles:(NSArray *)titles forState:(UIControlState)state; - (void)setButtonsTitleColor:(UIColor *)titleColor forState:(UIControlState)state; - (void)setButtonsImage:(UIImage *)image forState:(UIControlState)state; - (void)setButtonsBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)state; - (void)setButtonsBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state; - (void)setButtonsTitleFont:(UIFont *)font; - (void)setDescriptionsTexts:(NSArray *)texts; - (void)setDescriptionsTextColor:(UIColor *)textColor; - (void)setDescriptionsBackgroundColor:(UIColor *)backgroundColor; - (void)setDescriptionsFont:(UIFont *)font; - (void)setButtonsClipsToBounds:(BOOL)clipsToBounds; - (void)setButtonsContentEdgeInsets:(UIEdgeInsets)contentEdgeInsets; - (void)setButtonsAdjustsImageWhenHighlighted:(BOOL)adjustsImageWhenHighlighted; - (void)setButtonsLayerMasksToBounds:(BOOL)masksToBounds; - (void)setButtonsLayerCornerRadius:(CGFloat)cornerRadius; - (void)setButtonsLayerBorderColor:(UIColor *)borderColor borderWidth:(CGFloat)borderWidth; - (void)setButtonsLayerShadowColor:(UIColor *)shadowColor shadowOpacity:(float)shadowOpacity shadowOffset:(CGSize)shadowOffset shadowRadius:(CGFloat)shadowRadius;
// , "+" - (void)showAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)hideAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler; // - (void)showButtonsAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)hideButtonsAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler;
- (instancetype)initWithView:(UIView *)view; - (instancetype)initWithTitles:(NSArray *)titles;
@property (assign, nonatomic) id<LGFilterViewDelegate> delegate; - (void)filterViewWillShow:(LGFilterView *)filterView; - (void)filterViewWillDismiss:(LGFilterView *)filterView; - (void)filterViewDidShow:(LGFilterView *)filterView; - (void)filterViewDidDismiss:(LGFilterView *)filterView; - (void)filterView:(LGFilterView *)filterView buttonPressedWithTitle:(NSString *)title index:(NSUInteger)index; - (void)filterViewCancelled:(LGFilterView *)filterView;
@property (strong, nonatomic) void (^willShowHandler)(LGFilterView *filterView); @property (strong, nonatomic) void (^willDismissHandler)(LGFilterView *filterView); @property (strong, nonatomic) void (^didShowHandler)(LGFilterView *filterView); @property (strong, nonatomic) void (^didDismissHandler)(LGFilterView *filterView); @property (strong, nonatomic) void (^actionHandler)(LGFilterView *filterView, NSString *title, NSUInteger index); @property (strong, nonatomic) void (^cancelHandler)(LGFilterView *filterView);
kLGFilterViewWillShowNotification; kLGFilterViewWillDismissNotification; kLGFilterViewDidShowNotification; kLGFilterViewDidDismissNotification;
@property (assign, nonatomic) LGFilterViewTransitionStyle transitionStyle; @property (assign, nonatomic) CGPoint offset; @property (assign, nonatomic) UIEdgeInsets contentInset; @property (assign, nonatomic) CGFloat heightMax; @property (assign, nonatomic, getter=isSeparatorsVisible) BOOL separatorsVisible; @property (strong, nonatomic) UIColor *separatorsColor; @property (assign, nonatomic) UIEdgeInsets separatorsEdgeInsets; @property (strong, nonatomic) UIColor *titleColor; @property (strong, nonatomic) UIColor *titleColorHighlighted; @property (strong, nonatomic) UIColor *titleColorSelected; @property (strong, nonatomic) UIColor *backgroundColorHighlighted; @property (strong, nonatomic) UIColor *backgroundColorSelected; @property (strong, nonatomic) UIFont *font; @property (assign, nonatomic) NSUInteger numberOfLines; @property (assign, nonatomic) NSLineBreakMode lineBreakMode; @property (assign, nonatomic) NSTextAlignment textAlignment; @property (assign, nonatomic) BOOL adjustsFontSizeToFitWidth; @property (assign, nonatomic) CGFloat minimumScaleFactor; @property (assign, nonatomic) CGFloat cornerRadius; @property (assign, nonatomic) CGFloat borderWidth; @property (strong, nonatomic) UIColor *borderColor; @property (assign, nonatomic) UIScrollViewIndicatorStyle indicatorStyle;
- (void)showInView:(UIView *)view animated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)dismissAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler;
- (instancetype)initWithScrollView:(UIScrollView *)scrollView;
@property (assign, nonatomic) id<LGRefreshViewDelegate> delegate; - (void)refreshViewRefreshing:(LGRefreshView *)refreshView;
@property (strong, nonatomic) void (^refreshHandler)(LGRefreshView *refreshView);
kLGRefreshViewBeginRefreshingNotification; kLGRefreshViewEndRefreshingNotification;
- (void)endRefreshing;
- (void)triggerAnimated:(BOOL)animated;
- (instancetype)initWithView:(UIView *)view;
kLGPlaceholderViewWillShowNotification; kLGPlaceholderViewWillDismissNotification; kLGPlaceholderViewDidShowNotification; kLGPlaceholderViewDidDismissNotification;
- (void)showActivityIndicatorAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)showActivityIndicatorWithText:(NSString *)text animated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)showProgressViewAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)showProgressViewWithText:(NSString *)text animated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)showText:(NSString *)text animated:(BOOL)animated completionHandler:(void(^)())completionHandler; - (void)showView:(UIView *)view animated:(BOOL)animated completionHandler:(void(^)())completionHandler;
- (void)dismissAnimated:(BOOL)animated completionHandler:(void(^)())completionHandler;
#pragma mark - Rectangle + (UIImage *)drawRectangleWithImageSize:(CGSize)imageSize size:(CGSize)size offset:(CGPoint)offset rotate:(CGFloat)degrees roundedCorners:(UIRectCorner)roundedCorners cornerRadius:(CGFloat)cornerRadius backgroundColor:(UIColor *)backgroundColor fillColor:(UIColor *)fillColor strokeColor:(UIColor *)strokeColor strokeThickness:(CGFloat)strokeThickness strokeDash:(NSArray *)strokeDash strokeType:(LGDrawerStrokeType)strokeType shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; #pragma mark - Ellipse + (UIImage *)drawEllipseWithImageSize:(CGSize)imageSize size:(CGSize)size offset:(CGPoint)offset rotate:(CGFloat)degrees backgroundColor:(UIColor *)backgroundColor fillColor:(UIColor *)fillColor strokeColor:(UIColor *)strokeColor strokeThickness:(CGFloat)strokeThickness strokeDash:(NSArray *)strokeDash strokeType:(LGDrawerStrokeType)strokeType shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; #pragma mark - Triangle /** Stroke type is center */ + (UIImage *)drawTriangleWithImageSize:(CGSize)imageSize size:(CGSize)size offset:(CGPoint)offset rotate:(CGFloat)degrees cornerRadius:(CGFloat)cornerRadius direction:(LGDrawerDirection)direction backgroundColor:(UIColor *)backgroundColor fillColor:(UIColor *)fillColor strokeColor:(UIColor *)strokeColor strokeThickness:(CGFloat)strokeThickness strokeDash:(NSArray *)strokeDash shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; #pragma mark - Shadow + (UIImage *)drawShadowWithImageSize:(CGSize)imageSize direction:(LGDrawerDirection)direction backgroundColor:(UIColor *)backgroundColor shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; #pragma mark - Plus + (UIImage *)drawPlusWithImageSize:(CGSize)imageSize size:(CGSize)size offset:(CGPoint)offset rotate:(CGFloat)degrees thickness:(CGFloat)thickness roundedCorners:(UIRectCorner)roundedCorners cornerRadius:(CGFloat)cornerRadius backgroundColor:(UIColor *)backgroundColor fillColor:(UIColor *)fillColor strokeColor:(UIColor *)strokeColor strokeThickness:(CGFloat)strokeThickness strokeDash:(NSArray *)strokeDash strokeType:(LGDrawerStrokeType)strokeType shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; + (UIImage *)drawPlusWithImageSize:(CGSize)imageSize size:(CGSize)size offset:(CGPoint)offset rotate:(CGFloat)degrees thickness:(CGFloat)thickness backgroundColor:(UIColor *)backgroundColor color:(UIColor *)color dash:(NSArray *)dash shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; #pragma mark - Cross + (UIImage *)drawCrossWithImageSize:(CGSize)imageSize size:(CGSize)size offset:(CGPoint)offset rotate:(CGFloat)degrees thickness:(CGFloat)thickness roundedCorners:(UIRectCorner)roundedCorners cornerRadius:(CGFloat)cornerRadius backgroundColor:(UIColor *)backgroundColor fillColor:(UIColor *)fillColor strokeColor:(UIColor *)strokeColor strokeThickness:(CGFloat)strokeThickness strokeDash:(NSArray *)strokeDash strokeType:(LGDrawerStrokeType)strokeType shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; + (UIImage *)drawCrossWithImageSize:(CGSize)imageSize size:(CGSize)size offset:(CGPoint)offset rotate:(CGFloat)degrees thickness:(CGFloat)thickness backgroundColor:(UIColor *)backgroundColor color:(UIColor *)color dash:(NSArray *)dash shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; #pragma mark - Line + (UIImage *)drawLineWithImageSize:(CGSize)imageSize length:(CGFloat)length offset:(CGPoint)offset rotate:(CGFloat)degrees thickness:(CGFloat)thickness direction:(LGDrawerLineDirection)direction backgroundColor:(UIColor *)backgroundColor color:(UIColor *)color dash:(NSArray *)dash shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; #pragma mark - Tick + (UIImage *)drawTickWithImageSize:(CGSize)imageSize size:(CGSize)size offset:(CGPoint)offset rotate:(CGFloat)degrees thickness:(CGFloat)thickness backgroundColor:(UIColor *)backgroundColor color:(UIColor *)color dash:(NSArray *)dash shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; #pragma mark - Arrow + (UIImage *)drawArrowWithImageSize:(CGSize)imageSize size:(CGSize)size offset:(CGPoint)offset rotate:(CGFloat)degrees thickness:(CGFloat)thickness direction:(LGDrawerDirection)direction backgroundColor:(UIColor *)backgroundColor color:(UIColor *)color dash:(NSArray *)dash shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; + (UIImage *)drawArrowTailedWithImageSize:(CGSize)imageSize size:(CGSize)size offset:(CGPoint)offset rotate:(CGFloat)degrees thickness:(CGFloat)thickness direction:(LGDrawerDirection)direction backgroundColor:(UIColor *)backgroundColor color:(UIColor *)color dash:(NSArray *)dash shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; #pragma mark - Heart /** Stroke type is center */ + (UIImage *)drawHeartWithImageSize:(CGSize)imageSize size:(CGSize)size offset:(CGPoint)offset rotate:(CGFloat)degrees backgroundColor:(UIColor *)backgroundColor fillColor:(UIColor *)fillColor strokeColor:(UIColor *)strokeColor strokeThickness:(CGFloat)strokeThickness strokeDash:(NSArray *)strokeDash shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; #pragma mark - Star /** Stroke type is center */ + (UIImage *)drawStarWithImageSize:(CGSize)imageSize size:(CGSize)size offset:(CGPoint)offset rotate:(CGFloat)degrees backgroundColor:(UIColor *)backgroundColor fillColor:(UIColor *)fillColor strokeColor:(UIColor *)strokeColor strokeThickness:(CGFloat)strokeThickness strokeDash:(NSArray *)strokeDash shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; #pragma mark - Menu + (UIImage *)drawMenuWithImageSize:(CGSize)imageSize size:(CGSize)size offset:(CGPoint)offset rotate:(CGFloat)degrees thickness:(CGFloat)thickness dotted:(BOOL)dotted dotsPosition:(LGDrawerMenuDotsPosition)dotsPosition dotsCornerRadius:(CGFloat)dotsCornerRadius linesCornerRadius:(CGFloat)linesCornerRadius backgroundColor:(UIColor *)backgroundColor fillColor:(UIColor *)fillColor strokeColor:(UIColor *)strokeColor strokeThickness:(CGFloat)strokeThickness strokeDash:(NSArray *)strokeDash shadowColor:(UIColor *)shadowColor shadowOffset:(CGPoint)shadowOffset shadowBlur:(CGFloat)shadowBlur; #pragma mark - Images + (UIImage *)drawImage:(UIImage *)image1 onImage:(UIImage *)image2 clear:(BOOL)clear; + (UIImage *)drawImageOnImage:(NSArray *)images; + (UIImage *)drawImagesWithFinishSize:(CGSize)finishSize image1:(UIImage *)image1 image1Rect:(CGRect)rect1 image2:(UIImage *)image2 image2Rect:(CGRect)rect2 clear:(BOOL)clear; + (UIImage *)drawImagesWithFinishSize:(CGSize)finishSize image1:(UIImage *)image1 image1Offset:(CGPoint)offset1 image2:(UIImage *)image2 image2Offset:(CGPoint)offset2 clear:(BOOL)clear;
Source: https://habr.com/ru/post/262615/
All Articles