EAIntroView-highly customizable general solution for the iOS application welcome page, eaintroviewios

Source: Internet
Author: User

EAIntroView-highly customizable general solution for the iOS application welcome page, eaintroviewios

Introduction

Highly customizable general solutions for application welcome pages, not limited to existing demos.

  • Project homepage: EAIntroView
  • Latest example: Click to download
Getting started

After installation, introduce "EAIntroView. h" and set the EAIntroDelegate agent.

Install with CocoaPods
pod 'EAIntroView', '~> 2.7.0'
Manual Installation

Add the. h and. m Files of EAIntroPage, EAIntroView, and EARestrictedScrollView to your project.

Customization

EAIntroView can be highly customized, not limited to existing demos.
EAIntroView is an IntroView used for display and a set of display pages to form a series of boot display pages.
The basic usage is to create an EAIntropage (which can be customized. See the following for details), and use this EAIntropage to create an EAIntroView IntroView, upload the IntroView showInView to the view you want to display (see the following figure)

Each basic page used for display has


* Background (transition between cross pages)
* Custom iOS7 motion effect (parallax) on the background)
* Title view (y coordinate)
* Title text (font, color, y coordinate)
* Description text (font, color, width, y coordinate)
* Subview array (added to the interface after the default layout is created)

Set page custom View:
  • PageWithCustomView: // custom View
  • PageWithCustomViewFromNibNamed: // custom nib
Events on each page
  • PageDidLoad page loading
  • PageDidAppear page display
  • PageDidDisappear page disappears
Many options are used to define the parent View:
  • Swipe from last page to close // slide to the last close
  • Switching pages with one simple tap // Pat Switch
  • Custom background image or color // sets the background image and color.
  • Custom page control // define page control
  • Custom skip button // custom skip button
  • Pinned titleView // custom title View
Proxy protocol:
  • IntroDidFinish: // complete the boot
  • Intro: pageAppeared: withIndex: // boot page Switch
Methods supported by IntroView:


* SetPages: // settings page
* ShowInView: animateDuration: // sets an animation.
* HideWithFadeOutDuration: // display and disappear time
* SetCurrentPageIndex: animated: // sets the currently displayed interface and animation.




Use: Step 1: Create an Interface

Each interface needs to be created through [EAIntroPage]. You can customize attributes. All attributes are optional. or you can use your custom view (which can be nib). Most of the options are ignored. for example:

// Basic creation method: EAIntroPage * page1 = [EAIntroPage]; page1.title = @ "Hello world"; page1.desc = sampleDescription1; // custom, these attributes are optional EAIntroPage * page2 = [EAIntroPage]; page2.title = @ "This is page 2"; page2.titleFont = [UIFont fontWithName: @ "Georgia-BoldItalic" size: 20]; page2.titlePositionY = 220; page2.desc = sampleDescription2; page2.descFont = [UIFont fontWithName: @ "Georgia-Italic" size: 18]; page2.descPositionY = 200; page2.titleIconView = [[UIImageView alloc] initWithImage: [UIImage imageNamed: @ "title2"]; custom = 100; // nib custom view EAIntroPage * page3 = [EAIntroPage custom: @ "IntroPage"]; page3.bgImage = [UIImage imageNamed: @ "bg2"];
Step 2: Create an overview View

After creating all the pages, you can create an introduction view, which is displayed sequentially in the description view. You can also initialize the view by passing it to IntroView. IntroView will recreate the View content.

EAIntroView * intro = [[EAIntroView alloc] initWithFrame: self. view. bounds andPages: @ [page1, page2, page3, page4]; // sets the proxy [intro setDelegate: self];
Step 3: display the guide Diagram
[intro showInView:self.view animateDuration:0.0];

Storyboard/IB visual programming support

Support for Storyboard/IB from EAIntroView 1.3.0

  • Drag UIView to IB document
  • Set its class to EAIntroView
  • Create the IBOutlet attribute of viewcontroller,
    @property(nonatomic,weak) IBOutlet EAIntroView *introView;
  • Link in IBIBOutletAndEAIntroView 
  • Create an interface array (you can use pageWithCustomViewFromNibNamed). A nib corresponds to each interface.
    In the setPages method, the array is passed to the EAIntroView attribute.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.