diff --git a/Pods/Onboard/Source/OnboardingContentViewController.h b/Pods/Onboard/Source/OnboardingContentViewController.h index 586d34512c7057c95fd3d035db6fb8ee18f2fcb9..c7fa9203bdd79565c6ccfb7486adce5361ebb939 100644 --- a/Pods/Onboard/Source/OnboardingContentViewController.h +++ b/Pods/Onboard/Source/OnboardingContentViewController.h @@ -56,6 +56,10 @@ typedef void (^action_callback)(OnboardingViewController *onboardController); */ @property (nonatomic, strong) UILabel *bodyLabel; +/** + * @brief The textfield. + */ +@property (nonatomic, strong) UIView *inputView; /** * @brief The button used to call the action handler if one was provided. @@ -167,7 +171,7 @@ NS_ASSUME_NONNULL_END * @brief Convenience class initializer for creating an onboarding content view controller with a video. * @return An instance of OnboardingViewController with the provided information. */ -+ (nonnull instancetype)contentWithTitle:(nullable NSString *)title body:(nullable NSString *)body videoURL:(nullable NSURL *)videoURL buttonText:(nullable NSString *)buttonText action:(nullable dispatch_block_t)action; ++ (nonnull instancetype)contentWithTitle:(nullable NSString *)title body:(nullable NSString *)body videoURL:(nullable NSURL *)videoURL inputView:(UIView *)inputView buttonText:(nullable NSString *)buttonText action:(nullable dispatch_block_t)action; /** @@ -197,6 +201,10 @@ NS_ASSUME_NONNULL_END */ - (nonnull instancetype)initWithTitle:(nullable NSString *)title body:(nullable NSString *)body image:(nullable UIImage *)image videoURL:(nullable NSURL *)videoURL buttonText:(nullable NSString *)buttonText actionBlock:(nullable action_callback)actionBlock; +<<<<<<< HEAD +======= +- (nonnull instancetype)initWithTitle:(nullable NSString *)title body:(nullable NSString *)body image:(nullable UIImage *)image videoURL:(nullable NSURL *)videoURL inputView:(nullable UIView *)inputView buttonText:(nullable NSString *)buttonText actionBlock:(nullable action_callback)actionBlock; +>>>>>>> eb9542c70251e074f35bc20a9257b4f829892cc9 /** * @brief Method used to update the alpha value for all floating subviews (image, title, body, etc.) diff --git a/Pods/Onboard/Source/OnboardingContentViewController.m b/Pods/Onboard/Source/OnboardingContentViewController.m index 1e9272dbcb1594bc262af5922123fc450438c28d..c7d48f93b18f762faedcae3102b2fc2316b6a9e6 100644 --- a/Pods/Onboard/Source/OnboardingContentViewController.m +++ b/Pods/Onboard/Source/OnboardingContentViewController.m @@ -31,6 +31,10 @@ static CGFloat const kMainPageControlHeight = 35; NSString * const kOnboardMainTextAccessibilityIdentifier = @"OnboardMainTextAccessibilityIdentifier"; NSString * const kOnboardSubTextAccessibilityIdentifier = @"OnboardSubTextAccessibilityIdentifier"; NSString * const kOnboardActionButtonAccessibilityIdentifier = @"OnboardActionButtonAccessibilityIdentifier"; +<<<<<<< HEAD +======= +NSString * const kOnboardInputViewAccessibilityIdentifier = @"OnboardInputViewAccessibilityIdentifier"; +>>>>>>> eb9542c70251e074f35bc20a9257b4f829892cc9 @interface OnboardingContentViewController () @@ -70,6 +74,13 @@ NSString * const kOnboardActionButtonAccessibilityIdentifier = @"OnboardActionBu return [[self alloc] initWithTitle:title body:body videoURL:videoURL buttonText:buttonText action:action]; } +<<<<<<< HEAD +======= ++ (instancetype)contentWithTitle:(NSString *)title body:(NSString *)body videoURL:(NSURL *)videoURL inputView:(UIView *)inputView buttonText:(NSString *)buttonText action:(dispatch_block_t)action { + return [[self alloc] initWithTitle:title body:body videoURL:videoURL buttonText:buttonText action:action]; +} + +>>>>>>> eb9542c70251e074f35bc20a9257b4f829892cc9 - (instancetype)initWithTitle:(NSString *)title body:(NSString *)body videoURL:(NSURL *)videoURL buttonText:(NSString *)buttonText action:(dispatch_block_t)action { return [self initWithTitle:title body:body image:nil videoURL:videoURL buttonText:buttonText actionBlock:^(OnboardingViewController *onboardController) { if (action) { @@ -149,6 +160,75 @@ NSString * const kOnboardActionButtonAccessibilityIdentifier = @"OnboardActionBu } +- (instancetype)initWithTitle:(NSString *)title body:(NSString *)body image:(UIImage *)image videoURL:(NSURL *)videoURL inputView:(UIView *)inputView buttonText:(NSString *)buttonText actionBlock:(action_callback)actionBlock { + self = [super init]; + + if (self == nil) { + return nil; + } + + // Icon image view + self.iconImageView = [[UIImageView alloc] initWithImage:image]; + self.iconWidth = image ? image.size.width : kDefaultImageViewSize; + self.iconHeight = image ? image.size.height : kDefaultImageViewSize; + + // Title label + self.titleLabel = [UILabel new]; + self.titleLabel.accessibilityIdentifier = kOnboardMainTextAccessibilityIdentifier; + self.titleLabel.text = title; + self.titleLabel.textColor = DEFAULT_TEXT_COLOR; + self.titleLabel.font = [UIFont fontWithName:kDefaultOnboardingFont size:kDefaultTitleFontSize]; + self.titleLabel.numberOfLines = 0; + self.titleLabel.textAlignment = NSTextAlignmentCenter; + + // Body label + self.bodyLabel = [UILabel new]; + self.bodyLabel.accessibilityIdentifier = kOnboardSubTextAccessibilityIdentifier; + self.bodyLabel.text = body; + self.bodyLabel.textColor = DEFAULT_TEXT_COLOR; + self.bodyLabel.font = [UIFont fontWithName:kDefaultOnboardingFont size:kDefaultBodyFontSize]; + self.bodyLabel.numberOfLines = 0; + self.bodyLabel.textAlignment = NSTextAlignmentCenter; + + // Input view + self.inputView = inputView; + if (self.inputView) { + self.inputView.accessibilityIdentifier = kOnboardInputViewAccessibilityIdentifier; + } + + // Action button + self.actionButton = [UIButton new]; + self.actionButton.accessibilityIdentifier = kOnboardActionButtonAccessibilityIdentifier; + self.actionButton.titleLabel.font = [UIFont fontWithName:kDefaultOnboardingFont size:kDefaultButtonFontSize]; + [self.actionButton setTitle:buttonText forState:UIControlStateNormal]; + [self.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [self.actionButton addTarget:self action:@selector(handleButtonPressed) forControlEvents:UIControlEventTouchUpInside]; + + self.buttonActionHandler = actionBlock ?: ^(OnboardingViewController *controller){}; + + // Movie player + self.videoURL = videoURL; + + // Auto-navigation + self.movesToNextViewController = NO; + + // Default padding values + self.topPadding = kDefaultTopPadding; + self.underIconPadding = kDefaultUnderIconPadding; + self.underTitlePadding = kDefaultUnderTitlePadding; + self.bottomPadding = kDefaultBottomPadding; + self.underPageControlPadding = kDefaultUnderPageControlPadding; + + // Default blocks + self.viewWillAppearBlock = ^{}; + self.viewDidAppearBlock = ^{}; + self.viewWillDisappearBlock = ^{}; + self.viewDidDisappearBlock = ^{}; + + return self; +} + + #pragma mark - View life cycle - (void)viewDidLoad { @@ -172,6 +252,9 @@ NSString * const kOnboardActionButtonAccessibilityIdentifier = @"OnboardActionBu [self.view addSubview:self.iconImageView]; [self.view addSubview:self.titleLabel]; [self.view addSubview:self.bodyLabel]; + if (self.inputView) { + [self.view addSubview:self.inputView]; + } [self.view addSubview:self.actionButton]; } @@ -284,7 +367,15 @@ NSString * const kOnboardActionButtonAccessibilityIdentifier = @"OnboardActionBu [self.bodyLabel sizeToFit]; self.bodyLabel.frame = CGRectMake(xPadding, bodyYOrigin, contentWidth, CGRectGetHeight(self.bodyLabel.frame)); + self.actionButton.frame = CGRectMake((CGRectGetMaxX(self.view.frame) / 2) - (contentWidth / 2), CGRectGetMaxY(self.view.frame) - self.underPageControlPadding - kMainPageControlHeight - kActionButtonHeight - self.bottomPadding, contentWidth, kActionButtonHeight); + + CGFloat inputYOrigin = CGRectGetMaxY(self.bodyLabel.frame) + self.underTitlePadding; + if (self.inputView) { + self.inputView.frame = CGRectMake(xPadding, inputYOrigin, contentWidth, CGRectGetHeight(self.inputView.frame)); + + self.actionButton.frame = CGRectMake((CGRectGetMaxX(self.view.frame) / 2) - (contentWidth / 2), CGRectGetMaxY(self.view.frame) - self.underPageControlPadding - kMainPageControlHeight - kActionButtonHeight - self.bottomPadding - CGRectGetMaxY(self.inputView.frame), contentWidth, kActionButtonHeight); + } } diff --git a/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000000000000000000000000000000000..94b2795e225da4a26d84167bc90b2474092a7f03 --- /dev/null +++ b/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Workspace + version = "1.0"> +</Workspace> diff --git a/Pods/Pods.xcodeproj/xcuserdata/jakobsbode.xcuserdatad/xcschemes/Onboard.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/jakobsbode.xcuserdatad/xcschemes/Onboard.xcscheme new file mode 100644 index 0000000000000000000000000000000000000000..e6ca41ff88baf720d37a58fbf77e335a98ca7e87 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/jakobsbode.xcuserdatad/xcschemes/Onboard.xcscheme @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "0700" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + <BuildActionEntries> + <BuildActionEntry + buildForAnalyzing = "YES" + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES"> + <BuildableReference + BuildableIdentifier = 'primary' + BlueprintIdentifier = 'D7FF48F3092783E4E42B336F0DEF2D1A' + BlueprintName = 'Onboard' + ReferencedContainer = 'container:Pods.xcodeproj' + BuildableName = 'Onboard.framework'> + </BuildableReference> + </BuildActionEntry> + </BuildActionEntries> + </BuildAction> + <TestAction + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES" + buildConfiguration = "Debug"> + <AdditionalOptions> + </AdditionalOptions> + </TestAction> + <LaunchAction + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + debugServiceExtension = "internal" + buildConfiguration = "Debug" + allowLocationSimulation = "YES"> + <AdditionalOptions> + </AdditionalOptions> + </LaunchAction> + <ProfileAction + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + debugDocumentVersioning = "YES" + buildConfiguration = "Release" + shouldUseLaunchSchemeArgsEnv = "YES"> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Debug"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Release" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme> diff --git a/enzevalos_iphone.xcworkspace/xcuserdata/Olli.xcuserdatad/UserInterfaceState.xcuserstate b/enzevalos_iphone.xcworkspace/xcuserdata/Olli.xcuserdatad/UserInterfaceState.xcuserstate index 6110adde4bfa2ce920c052a6aebcfe549b43bd1a..e0ee77f1a1102eec54e70cd011fcf5eda769505f 100644 Binary files a/enzevalos_iphone.xcworkspace/xcuserdata/Olli.xcuserdatad/UserInterfaceState.xcuserstate and b/enzevalos_iphone.xcworkspace/xcuserdata/Olli.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/enzevalos_iphone.xcworkspace/xcuserdata/jakobsbode.xcuserdatad/UserInterfaceState.xcuserstate b/enzevalos_iphone.xcworkspace/xcuserdata/jakobsbode.xcuserdatad/UserInterfaceState.xcuserstate index 721c48243aab7504b7e44581a13606b226c5ec35..9262408ad3efd899b17b614ee010008361a7b465 100644 Binary files a/enzevalos_iphone.xcworkspace/xcuserdata/jakobsbode.xcuserdatad/UserInterfaceState.xcuserstate and b/enzevalos_iphone.xcworkspace/xcuserdata/jakobsbode.xcuserdatad/UserInterfaceState.xcuserstate differ