AOTutorial 1.7

AOTutorial 1.7

测试已测试
语言语言 Obj-CObjective C
许可协议 MIT
发布上次发布2014年12月

Appsido 维护。



  • 作者
  • Loïc Griffié

AOTutorial - 开箱即用的教程应用程序

AOTutorial 基于 MIT 协议,如果您觉得它很有用,只需使用它即可!

AOTutorialDemo

该项目帮助创建一个应用程序教程,展示给用户应用的使用指导。背景图片的淡入/淡出动画效果基于 scrollview 内容偏移。

屏幕截图:

AOTutorialDemo 在 iPhone 模拟器中

ScreenShot

视频:

http://public.appsido.com/iPhone/public/AOTutorial/AOTutorial.mp4

如何使用它

示例项目展示了简单的用法。

文档

/**
 * Custom init method to create a new AOTutorialController object
 *
 * @param NSArray collection of background images (ie. @[@"bg_1.jpg", @"bg_2.jpg", @"bg_3.jpg"])
 * @param NSArray collection of labels (ie. @[@{@"Header": @"Header 1", @"Label": @"label 1"}, @{@"Header": @"Header 2", @"Label": @"label 2"}, @{@"Header": @"Header 3", @"Label": @"label 3"}])
 *
 * @return AOTutorialController
 */

- (instancetype)initWithBackgroundImages:(NSArray *)images andInformations:(NSArray *)informations;

/**
 * Define a header image
 *
 * @param UIImage image used for header
 */

- (void)setHeaderImage:(UIImage *)logo;

/**
 * Callback for Signup button being touched up
 */

- (IBAction)signup:(id)sender;

/**
 * Callback for Login button being touched up
 */


- (IBAction)login:(id)sender;

/**
 * Callback for Dismiss button being touched up
 */


- (IBAction)dismiss:(id)sender;

代码片段

// First create a new view controller class that inherit from AOTutorialViewController class. Do not forget to import the AOTutorialViewController interface

#import "AOTutorialViewController.h"

@interface AOTutorialController : AOTutorialViewController

@end

// Then in the .m file add the buttons action methods

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self)
    {

    }
    return self;
}

#pragma mark - User interface methods

- (IBAction)signup:(id)sender
{
    NSLog(@"signup button touch up completed");
}

- (IBAction)login:(id)sender
{
    NSLog(@"login button touch up completed");
}

- (IBAction)dismiss:(id)sender
{
    NSLog(@"dismiss button touch up completed");
}

// Finally load your Tutorial view controller
AOTutorialController *vc = [[AOTutorialController alloc] initWithBackgroundImages:@[@"bg_1.jpg", @"bg_2.jpg", @"bg_3.jpg", @"bg_4.jpg", @"bg_5.jpg"]
                                                                      andInformations:@[@{@"Header": @"Header 1", @"Label": @"label 1"}, @{@"Header": @"Header 2", @"Label": @"label 2"}, @{@"Header": @"Header 3", @"Label": @"label 3"}, @{@"Header": @"Header 4", @"Label": @"label 4"}, @{@"Header": @"Header 5", @"Label": @"label 5"}]];

// Define which button you want. By default only dismiss button is shown
[vc setButtons:AOTutorialButtonSignup | AOTutorialButtonLogin];

// Define a company header image. By default no image is shown
[vc setHeaderImage:[UIImage imageNamed:@"myCompanyLogo.png"]];

欢迎提出任何意见

@Appsido [email protected]