-
Notifications
You must be signed in to change notification settings - Fork 764
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
Storyboard example #31
Comments
What exactly do you mean? Building an OnboardingContentViewController with a storyboard, or having the root view of the project be from a storyboard? |
I think he means the root view of the project be from a storyboard, and how to subclass OnboardingViewController to create your own onboarding experience. The cocoapods version, seems very out of sync with the current example, and so I understand his frustration. |
@vivanda Something like this will work. #import "OnboardingViewController.h"
@interface GKOnboardingViewController : OnboardingViewController
@end #import "GKOnboardingViewController.h"
#import "OnboardingContentViewController.h"
@interface GKOnboardingViewController ()
@end
@implementation GKOnboardingViewController
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithBackgroundImage:nil contents:nil];
if (self) {
self.iconSize = 160;
self.fontName = @"HelveticaNeue-Thin";
self.shouldMaskBackground = NO;
self.shouldBlurBackground = NO;
OnboardingContentViewController *firstPage = [[OnboardingContentViewController alloc] initWithTitle:@"Welcome" body:@"This is a demo." image:nil buttonText:@"Enable Locational Services" action:nil];
OnboardingContentViewController *secondPage = [[OnboardingContentViewController alloc] initWithTitle:@"Relax" body:@"Grab a nice beverage, sit back, and enjoy the experience." image:nil buttonText:nil action:nil];
OnboardingContentViewController *thirdPage = [[OnboardingContentViewController alloc] initWithTitle:@"Rock Out" body:@"Import your favorite tunes and jam out while you browse." image:nil buttonText:nil action:nil];
OnboardingContentViewController *fourthPage = [[OnboardingContentViewController alloc] initWithTitle:@"Experiment" body:@"Try new things, explore different combinations, and see what you come up with!" image:nil buttonText:@"Let's Get Started" action:nil];
_backgroundImage = [UIImage imageNamed:@"Street"];
_viewControllers = @[firstPage, secondPage, thirdPage, fourthPage];
}
return self;
}
@end |
@Kurry thanks for the feedback. I updated the version and pushed to the Cocoapods trunk, so everything should be up-to-date now. |
@mamaral Thanks. I forgot to say thanks for creating this project. It's pretty great, so good that I'm using it in one of my personal projects now. |
No problem! Glad to get something out there that helps. |
would you mind to add a Storyboard example. That would be great! Thanks in advance!
The text was updated successfully, but these errors were encountered: