Newer
Older
//
// OnboardingViewController.h
// Onboard
//
// Created by Mike on 8/17/14.
// Copyright (c) 2014 Mike Amaral. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "OnboardingContentViewController.h"
@import AVKit;
@interface OnboardingViewController : UIViewController <UIPageViewControllerDataSource, UIPageViewControllerDelegate, UIScrollViewDelegate, OnboardingContentViewControllerDelegate>
/**
* @brief The onboarding content view controllers.
*/
@property (nonatomic, strong) NSArray *viewControllers;
/**
* @brief The background image that will be visible through the content view controllers.
*/
@property (nonatomic, strong) UIImage *backgroundImage;
/**
* @brief The background imageView presented. if a backgroundimage is shown.
*/
@property (nonatomic) UIImageView *backgroundImageView;
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/**
* @brief Determines whether or not the background will be masked. The default value of this property is YES.
*/
@property (nonatomic) BOOL shouldMaskBackground;
/**
* @brief Determines whether or not the background will be blurred. The default value of this property is NO;
*/
@property (nonatomic) BOOL shouldBlurBackground;
/**
* @brief Determines whether or not the contents on screen will fade as the user swipes between pages. The default value of this property is NO.
*/
@property (nonatomic) BOOL shouldFadeTransitions;
/**
* @brief Determines whether or not the background will be masked. The default value of this property is NO.
*/
@property (nonatomic) BOOL fadePageControlOnLastPage;
/**
* @brief Determines whether or not the skip button will fade away on the last page. The default value of this property is NO.
*/
@property (nonatomic) BOOL fadeSkipButtonOnLastPage;
/**
* @brief Determines whether or not the ship button will be shown. The default value of this property is NO.
*/
@property (nonatomic) BOOL allowSkipping;
/**
* @brief A block that will be executed when the skip button is pressed.
*/
@property (nonatomic, strong) dispatch_block_t skipHandler;
/**
* @brief Determines whether or not swiping is enabled between pages. The default value of this property is YES.
*/
@property (nonatomic) BOOL swipingEnabled;
/**
* @brief Determines whether or not the page cotrol will be visible.
*/
@property (nonatomic, strong) UIPageControl *pageControl;
/**
* @brief The skip button that allows users to skip onboarding anytime.
*/
@property (nonatomic, strong) UIButton *skipButton;
/**
* @brief Determines whether or not the movie player stops playing when the view disappears.
*/
@property (nonatomic) BOOL stopMoviePlayerWhenDisappear;
/**
* @brief The movie player controller used to play background movies.
*/
@property (nonatomic, strong) AVPlayerViewController *moviePlayerController;
/**
* @brief The padding between the bottom of the screen and the bottom of the page control.
*/
@property (nonatomic) CGFloat underPageControlPadding;
/**
* @brief Convenience class initializer for onboarding with a backround image.
* @return An instance of OnboardingViewController with the provided background image and content view controllers.
*/
+ (instancetype)onboardWithBackgroundImage:(UIImage *)backgroundImage contents:(NSArray *)contents;
/**
* @brief Initializer for onboarding with a backround video.
* @return An instance of OnboardingViewController with the provided background video and content view controllers.
*/
- (instancetype)initWithBackgroundImage:(UIImage *)backgroundImage contents:(NSArray *)contents;
/**
* @brief Convenience class initializer for onboarding with a backround video.
* @return An instance of OnboardingViewController with the provided background video and content view controllers.
*/
+ (instancetype)onboardWithBackgroundVideoURL:(NSURL *)backgroundVideoURL contents:(NSArray *)contents;
/**
* @brief Initializer for onboarding with a backround video.
* @return An instance of OnboardingViewController with the provided background video and content view controllers.
*/
- (instancetype)initWithBackgroundVideoURL:(NSURL *)backgroundVideoURL contents:(NSArray *)contents;
/**
* @brief Method to tell the onboarding view controller to automatically move to the next page.
*/
- (void)moveNextPage;
- (void)fadeBackground:(UIImage *) newImage;