Skip to content

correction to allow custom init methods in subclasses #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions MFSideMenu/MFSideMenuContainerViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ typedef enum {

@interface MFSideMenuContainerViewController : UIViewController<UIGestureRecognizerDelegate>

+ (MFSideMenuContainerViewController *)containerWithCenterViewController:(id)centerViewController
leftMenuViewController:(id)leftMenuViewController
rightMenuViewController:(id)rightMenuViewController;
+ (instancetype)containerWithCenterViewController:(id)centerViewController
leftMenuViewController:(id)leftMenuViewController
rightMenuViewController:(id)rightMenuViewController;

@property (nonatomic, strong) id centerViewController;
@property (nonatomic, strong) UIViewController *leftMenuViewController;
Expand Down
8 changes: 4 additions & 4 deletions MFSideMenu/MFSideMenuContainerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ @implementation MFSideMenuContainerViewController
#pragma mark -
#pragma mark - Initialization

+ (MFSideMenuContainerViewController *)containerWithCenterViewController:(id)centerViewController
leftMenuViewController:(id)leftMenuViewController
rightMenuViewController:(id)rightMenuViewController {
MFSideMenuContainerViewController *controller = [MFSideMenuContainerViewController new];
+ (instancetype)containerWithCenterViewController:(id)centerViewController
leftMenuViewController:(id)leftMenuViewController
rightMenuViewController:(id)rightMenuViewController {
MFSideMenuContainerViewController *controller = [[self alloc] init];
controller.leftMenuViewController = leftMenuViewController;
controller.centerViewController = centerViewController;
controller.rightMenuViewController = rightMenuViewController;
Expand Down
4 changes: 2 additions & 2 deletions MFSideMenu/MFSideMenuShadow.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
@property (nonatomic, strong) UIColor *color;
@property (nonatomic, assign) UIView *shadowedView;

+ (MFSideMenuShadow *)shadowWithView:(UIView *)shadowedView;
+ (MFSideMenuShadow *)shadowWithColor:(UIColor *)color radius:(CGFloat)radius opacity:(CGFloat)opacity;
+ (instancetype)shadowWithView:(UIView *)shadowedView;
+ (instancetype)shadowWithColor:(UIColor *)color radius:(CGFloat)radius opacity:(CGFloat)opacity;

- (void)draw;
- (void)shadowedViewWillRotate;
Expand Down
8 changes: 4 additions & 4 deletions MFSideMenu/MFSideMenuShadow.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ @implementation MFSideMenuShadow
@synthesize enabled = _enabled;
@synthesize shadowedView;

+ (MFSideMenuShadow *)shadowWithView:(UIView *)shadowedView {
MFSideMenuShadow *shadow = [MFSideMenuShadow shadowWithColor:[UIColor blackColor] radius:10.0f opacity:0.75f];
+ (instancetype)shadowWithView:(UIView *)shadowedView {
MFSideMenuShadow *shadow = [self shadowWithColor:[UIColor blackColor] radius:10.0f opacity:0.75f];
shadow.shadowedView = shadowedView;
return shadow;
}

+ (MFSideMenuShadow *)shadowWithColor:(UIColor *)color radius:(CGFloat)radius opacity:(CGFloat)opacity {
MFSideMenuShadow *shadow = [MFSideMenuShadow new];
+ (instancetype)shadowWithColor:(UIColor *)color radius:(CGFloat)radius opacity:(CGFloat)opacity {
MFSideMenuShadow *shadow = [[self alloc] init];
shadow.color = color;
shadow.radius = radius;
shadow.opacity = opacity;
Expand Down