Skip to content

swiftmanagementag/VXToolKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VXWalkthroughViewController

VXWalkthroughViewController is a simple way to add an intro to your app. Show your users the main features of your app, step by step. Your onboarding tutorial can include text, images and even simple html.

VXWalkthroughViewController

VXWalkthroughViewController features:

  • Simple to integrate
  • Uses existing localisation for configuration
  • Images supported
  • iPhone and iPad support

Installation

CocoaPods

If you want to use VXWalkthroughViewController with CocoaPods pod 'VXWalkthroughViewController', :head

Manually

  • Drag the VXWalkthroughViewController/VXWalkthroughViewController folder into your project.
  • #import "VXWalkthroughViewController.h"

Usage

(see sample Xcode project in /Demo)

Add some steps to your Localizable.strings file, so it can be found using NSLocalizedString. You can add as many steps as you like, but start at 0 and make them without steps. If you want images, add them to your project with the predetermined names of walkthrough_0.png, walkthrough_1.png, etc.

"walkthrough_0" = "See No Evil";
"walkthrough_1" = "Hear No Evil";
"walkthrough_2" = "Speak No Evil";

Check if you should display the walkthrough in viewDidload:

if(![VXWalkthroughViewController walkthroughShown]) {
	// this is to avoid timing issues
	dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
		// show the walkthrough
		[self showWalkthrough];
	});
}

This is the simplest way using the convenience method VXWalkthroughModalViewController:

- (void)showWalkthrough{
	UIColor *backgroundColor = [UIColor colorWithRed:167.0f/255.0f green:131.0f/255.0f blue:82.0f/255.0f alpha:1.0f];

	// create the walkthough controller
	VXWalkthroughViewController* walkthrough = [VXWalkthroughViewController initWithDelegate:self withBackgroundColor:backgroundColor];

	// show it
	[self presentViewController:walkthrough animated:YES completion:nil];
}
-(void)walkthroughCloseButtonPressed:(id)sender{
	// delegate for handling close button
	[self dismissViewControllerAnimated:YES completion:nil];
}

Release notes

1.0.10

Implemented suggestion of Jay Lyerly to add the option of using fullscreen images

	walkthrough.roundImages = NO;
	walkthrough.pageStoryboardID = @"WalkthroughPageFull";

Credits

VXWalkthroughViewController is based on Yari D'areglia BWWalkthrough and Sam Vermettes SVWebViewController. VXWalkthroughViewController is brought to you by Swift Management AG and contributors to the project. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by creating new issues. If you're using VXWalkthroughViewController in your project, attribution is always appreciated.

About

Collection of utility functions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published