SkillAgentSearch skills...

LAWalkthrough

A walkthrough view controller class for iOS designed to simplify the creation of the walkthrough design pattern.

Install / Use

/learn @larryaasen/LAWalkthrough
About this skill

Quality Score

0/100

Category

Design

Supported Platforms

Universal

README

LAWalkthrough

LAWalkthrough is a view controller class for iOS designed to simplify the creation of the walkthrough design pattern. This code was inspired in April, 2013 by the screenshots displayed at http://www.mobile-patterns.com/walkthroughs by Mari Sheibley.

It is simple to use and requires very little code to implement a nice looking walkthrough. It uses UIPageControl and UIScrollView and is easy to subclass for customization.

How To Get Started

Example Usage

Display a walkthrough with text views and a background image

// Create the walkthrough view controller
LAWalkthroughViewController *walkthrough = LAWalkthroughViewController.new;
walkthrough.view.frame = self.view.frame;
walkthrough.backgroundImage = [UIImage imageNamed:@"tour-bg@2x"];

// Create pages of the walkthrough
[walkthrough addPageWithBody:@"Take a tour of this app."];
[walkthrough addPageWithBody:@"Thanks for taking this tour."];

// Use the default next button
walkthrough.nextButtonText = nil;

// Add the walkthrough view to your view controller's view
[self addChildViewController:walkthrough];
[self.view addSubview:walkthrough.view];

Screenshot from this example:<br> <img src="Examples/iOS_Simulator_Screen_shot1.png" alt="LAWalkthrough" title="LAWalkthrough" width="260">

<p></p>

Display a walkthrough with XIB views and a background image

// Create the walkthrough view controller
LAWalkthroughViewController *walkthrough = LAWalkthroughViewController.new;
walkthrough.view.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height-50);
walkthrough.backgroundImage = [UIImage imageNamed:@"tour-bg1@2x"];

// Create pages of the walkthrough from XIBs
[walkthrough addPageWithNibName:@"TourView1" bundle:nil]; // no need for a view controller
[walkthrough addPageWithNibName:@"TourView2" bundle:nil]; // no need for a view controller
[walkthrough addPageWithNibName:@"TourView3" bundle:nil]; // no need for a view controller

// Use text for the next button
walkthrough.nextButtonText = @"Next >";

// Add the walkthrough view to your view controller's view
[self addChildViewController:walkthrough];
[self.view addSubview:walkthrough.view];

Screenshot from this example:<br> <img src="Examples/iOS_Simulator_Screen_shot2.png" alt="LAWalkthrough" title="LAWalkthrough" width="260">

<p></p>

Requirements

LAWalkthrough 1.0 and higher requires iOS 6.0 and above.

ARC

LAWalkthrough uses ARC as of its 1.0 release.

If you are using LAWalkthrough 1.0 in your non-arc project, you will need to set a -fobjc-arc compiler flag on all of the LAWalkthrough source files.

To set a compiler flag in Xcode, go to your active target and select the "Build Phases" tab. Now select all LAWalkthrough source files, press Enter, insert -fobjc-arc or -fno-objc-arc and then "Done" to enable or disable ARC for LAWalkthrough.

Credits

LAWalkthrough was created by Larry Aasen in the development of Konugo for iPhone.

Contact

Follow LAWalkthrough and Konugo on Twitter (@Konugo)

Creators

Larry Aasen
@larryaasen

License

LAWalkthrough is available under the MIT license. See the LICENSE file for more info.

Related Skills

View on GitHub
GitHub Stars232
CategoryDesign
Updated5mo ago
Forks26

Security Score

92/100

Audited on Oct 24, 2025

No findings