88
99#import " M2DWebViewController.h"
1010
11- static const CGSize M2DArrorIconSize = {18 , 18 };
11+ static const CGSize M2DArrowIconSize = {18 , 18 };
1212
13- typedef NS_ENUM (NSUInteger , ArrorIconDirection ) {
14- ArrorIconDirectionLeft ,
15- ArrorIconDirectionRight
13+ typedef NS_ENUM (NSUInteger , M2DArrowIconDirection ) {
14+ M2DArrowIconDirectionLeft ,
15+ M2DArrowIconDirectionRight
1616};
1717
1818@implementation UIImage (M2DArrowIcon)
1919
20- + (UIImage *)m2d_arrowIconWithDirection : (ArrorIconDirection )direction size : (CGSize)size
20+ + (UIImage *)m2d_arrowIconWithDirection : (M2DArrowIconDirection )direction size : (CGSize)size
2121{
2222 if (CGSizeEqualToSize (size, CGSizeZero)) {
2323 return [[UIImage alloc ] init ];
@@ -30,7 +30,7 @@ + (UIImage *)m2d_arrowIconWithDirection:(ArrorIconDirection)direction size:(CGSi
3030 CGContextSaveGState (context);
3131 CGContextBeginPath (context);
3232
33- if (direction == ArrorIconDirectionRight ) {
33+ if (direction == M2DArrowIconDirectionRight ) {
3434 CGContextMoveToPoint (context, 0 , 0 );
3535 CGContextAddLineToPoint (context, CGRectGetMaxX (rect), CGRectGetMidY (rect));
3636 CGContextAddLineToPoint (context, 0 , CGRectGetMaxY (rect));
@@ -117,8 +117,8 @@ - (void)viewWillAppear:(BOOL)animated
117117 [self .navigationController setToolbarHidden: NO animated: YES ];
118118 if (goBackButton_ == nil ) {
119119 NSArray *toolbarItems = nil ;
120- goBackButton_ = [[UIBarButtonItem alloc ] initWithImage: [UIImage m2d_arrowIconWithDirection: ArrorIconDirectionLeft size: M2DArrorIconSize ] style: UIBarButtonItemStylePlain target: self action: @selector (goBack: )];
121- goForwardButton_ = [[UIBarButtonItem alloc ] initWithImage: [UIImage m2d_arrowIconWithDirection: ArrorIconDirectionRight size: M2DArrorIconSize ] style: UIBarButtonItemStylePlain target: self action: @selector (goForward: )];
120+ goBackButton_ = [[UIBarButtonItem alloc ] initWithImage: [UIImage m2d_arrowIconWithDirection: M2DArrowIconDirectionLeft size: M2DArrowIconSize ] style: UIBarButtonItemStylePlain target: self action: @selector (goBack: )];
121+ goForwardButton_ = [[UIBarButtonItem alloc ] initWithImage: [UIImage m2d_arrowIconWithDirection: M2DArrowIconDirectionRight size: M2DArrowIconSize ] style: UIBarButtonItemStylePlain target: self action: @selector (goForward: )];
122122 UIBarButtonItem *space = [[UIBarButtonItem alloc ] initWithBarButtonSystemItem: UIBarButtonSystemItemFlexibleSpace target: nil action: nil ];
123123 UIBarButtonItem *fixedSpace19 = [[UIBarButtonItem alloc ] initWithBarButtonSystemItem: UIBarButtonSystemItemFixedSpace target: nil action: nil ];
124124 fixedSpace19.width = 19 ;
0 commit comments