-
beautiful demo project to look on some examples -
customizability is unlimited, one can make complex introView with animations and interactive pages, so do not limit yourself with existing examples
-
-
for each basic page: -
background (with cross-dissolve transition between pages) -
custom iOS7 motion effects (parallax) on background -
title view (+ Y position) -
title text (+ font, color and Y position) -
description text (+ font, color, width and Y position) -
subviews array (added to page after building default layout)
-
-
possibility to set your own custom view for page: -
pageWithCustomView: -
pageWithCustomViewFromNibNamed:
-
-
possibility to set block action on page events: -
pageDidLoad -
pageDidAppear -
pageDidDisappear
-
-
many options to customize parent view: -
swipe from last page to close -
switching pages with one simple tap -
custom background image or color -
custom page control -
custom skip button -
pinned titleView (+ Y position, can be hidden on some pages)
-
-
delegate protocol to listen: -
introDidFinish: -
intro:pageAppeared:withIndex:
-
-
actions on IntroView: -
setPages: -
showInView:animateDuration: -
hideWithFadeOutDuration: -
setCurrentPageIndex:animated:
-
-
storyboard/IB support -
and many more...
-
Add EAIntroView to your project's Cartfile : github "ealeksandrov/EAIntroView" -
Run carthage update in your project directory. -
On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop EAIntroView.framework and EARestrictedScrollView.framework from the Carthage/Build/iOS/ folder on disk. -
On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script with the following contents: /usr/local/bin/carthage copy-frameworks add the paths to the frameworks under “Input Files”: $( SRCROOT ) /Carthage/Build/iOS/EAIntroView.framework $( SRCROOT ) /Carthage/Build/iOS/EARestrictedScrollView.framework and the paths to the copied frameworks to the “Output Files”: $( BUILT_PRODUCTS_DIR ) / $( FRAMEWORKS_FOLDER_PATH ) /EAIntroView.framework $( BUILT_PRODUCTS_DIR ) / $( FRAMEWORKS_FOLDER_PATH ) /EARestrictedScrollView.framework
-
Add EAIntroView to your project's Podfile : pod 'EAIntroView' -
Run pod update or pod install in your project directory.
-
Add EARestrictedScrollView header and implementation to your project (2 files total). -
Add EAIntroPage and EAIntroView headers and implementations to your project (4 files total). -
You can now use EAIntroView by adding the following import: import EAIntroView # import < EAIntroView/EAIntroView.h >
// basic EAIntroPage *page1 = [EAIntroPage page ]; page1.title = @" Hello world " ; page1.desc = sampleDescription1; // custom EAIntroPage *page2 = [EAIntroPage page ]; page2.title = @" This is page 2 " ; page2.titleFont = [UIFont fontWithName: @" Georgia-BoldItalic " size: twenty ]; page2.titlePositionY = two hundred and twenty ; page2.desc = sampleDescription2; page2.descFont = [UIFont fontWithName: @" Georgia-Italic " size: eighteen ]; page2.descPositionY = two hundred ; page2.titleIconView = [[UIImageView alloc ] initWithImage: [UIImage imageNamed: @" title2 " ]]; page2.titleIconPositionY = one hundred ; // custom view from nib EAIntroPage *page3 = [EAIntroPage pageWithCustomViewFromNibNamed: @" IntroPage " ]; page3.bgImage = [UIImage imageNamed: @" bg2 " ];
EAIntroView *intro = [[EAIntroView alloc ] initWithFrame: self .view.bounds andPages: @[page1, page2,page3,page4]];
[intro setDelegate: self ];
[intro showInView: self .view animateDuration: zero ];
-
Drop UIView to your IB document. -
Set its class to EAIntroView . -
Create IBOutlet property in your view controller: @property(nonatomic, weak) IBOutlet EAIntroView *introView; . -
Connect IBOutlet with EAIntroView in IB. -
Build array of pages (you can use pageWithCustomViewFromNibNamed: here with separate nibs for each page). -
Pass pages array to EAIntroView property in setPages: .