Last active
December 20, 2015 02:39
-
-
Save icanswiftabit/6057961 to your computer and use it in GitHub Desktop.
UIViewController+someting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface SubedViewController :UIViewController | |
#import "UIViewController+TutorialView.h" | |
@implementation SubedViewController | |
-(void)removeTutorialImage { | |
if (imageContainer){ | |
[imageContainer removeFromSuperview]; | |
imageContainer = nil; | |
} | |
} | |
-(bool)isTutorialOn{ | |
if (imageContainer) { | |
return true; | |
} | |
return false; | |
} | |
- (void)viewDidUnload { | |
_infoButton = nil; | |
[super viewDidUnload]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "UIViewController+something.h" | |
UINavigationController *previousViewController = (UINavigationController*)self.selectedViewController; | |
if ([previousViewController isTutorialOn]) { | |
[[previousViewController visibleViewController] removeTutorialImage]; //Should call SubedViewController | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface UIViewController (TutorialView) | |
-(void)showTutorialView; | |
-(void)removeTutorialImage; | |
-(bool)isTutorialOn; | |
@end | |
#import "UIViewController+TutorialView.h" | |
@implementation UIViewController (TutorialView) | |
-(void)showTutorialView { | |
} | |
-(void)removeTutorialImage { | |
} | |
-(bool)isTutorialOn{ | |
return false; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment