zoukankan      html  css  js  c++  java
  • [翻译] ABCIntroView

    ABCIntroView

    ABCIntroView is an easy to use onboarding which allows you to introduce your users to the applicaiton before reaching the Main Screen.

    ABCIntroView是一个简单易用的引导页。

    To use the ABCIntroView please do the following:

    你需要遵循以下几步来使用它:

    1. Add the follwing files found in the CLASSES folder to your project: 将以下几个文件拖到你的项目当中:
            *ABCIntroView.h
            *ABCIntroView.m
    
    1. Import the ABCIntoView file to your RootViewController. 将ABCIntoView文件引入到你的RootViewController当中。

    2. Create an ABCIntroView property and add the ABCIntroViewDelegate. 创建ABCIntroView属性以及添加ABCIntroViewDelegate代理。

    3. Add the following line of code to your ViewDidLoad: 然后将以下代码添加到你的ViewDidLoad:方法中。

        NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
        if (![defaults objectForKey:@"intro_screen_viewed"]) {
            self.introView = [[ABCIntroView alloc] initWithFrame:self.view.frame];
            self.introView.delegate = self;
            self.introView.backgroundColor = [UIColor greenColor];
            [self.view addSubview:self.introView];  
        }
    
    1. Add the ABCIntroView Delegate Method: 添加ABCIntroView代理方法
    #pragma mark - ABCIntroViewDelegate Methods
    
    -(void)onDoneButtonPressed{
        //    Uncomment so that the IntroView does not show after the user clicks "DONE"
        //    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]
        //    [defaults setObject:@"YES"forKey:@"intro_screen_viewed"];
        //    [defaults synchronize];
        [UIView animateWithDuration:1.0 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
            self.introView.alpha = 0;
        } completion:^(BOOL finished) {
            [self.introView removeFromSuperview];
        }];
    }
    

    If you have any questions about the project, please don't hesitate to ask.

    如果有任何关于项目的疑问,不吝赐教。

    Enjoy! :)

    Adam

  • 相关阅读:
    Python Requests-学习笔记(9)-错误与异常
    .NET C# 创建WebService服务简单的例子
    10个免费开源的JS音乐播放器插件
    7款高颜值HTML5播放器:让你的音乐有声有色
    Asp.net基于session实现购物车的方法
    ASP.NET用GridView控件实现购物车功能
    jquery鼠标跟随流体吸引特效
    jquery鼠标跟随特效
    JQUERY互动星空粒子背景效果
    jQuery插件库常用前端库引用地址
  • 原文地址:https://www.cnblogs.com/YouXianMing/p/4372931.html
Copyright © 2011-2022 走看看