diff --git a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m index 476e7264..34dc2342 100644 --- a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m +++ b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m @@ -843,11 +843,27 @@ CGFloat const PanelAnimationDuration = 0.2; bottomProgressHeight.active = YES; self.bottomProgressBarHeightConstraint = bottomProgressHeight; + UITabBar *tabs = [[UITabBar alloc] init]; + tabs.translatesAutoresizingMaskIntoConstraints = NO; + tabs.tintColor = [UIColor mfRedColor]; + tabs.backgroundColor = [UIColor whiteColor]; + NSArray *tabList = @[[[UITabBarItem alloc] initWithTitle:nil image:[[MVMCoreUIUtility imageNamed:@"Home"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] tag:0], + [[UITabBarItem alloc] initWithTitle:nil image:[[MVMCoreUIUtility imageNamed:@"Account"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] tag:1], + [[UITabBarItem alloc] initWithTitle:nil image:[[MVMCoreUIUtility imageNamed:@"Bag"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] tag:2], + [[UITabBarItem alloc] initWithTitle:nil image:[[MVMCoreUIUtility imageNamed:@"Verizon Up"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] tag:3], + [[UITabBarItem alloc] initWithTitle:nil image:[[MVMCoreUIUtility imageNamed:@"More"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] tag:4]]; + [tabs setItems:tabList animated:NO]; + [tabs setSelectedItem:tabList[0]]; + tabs.delegate = self; + [self.view addSubview:tabs]; + [NSLayoutConstraint constraintWithItem:tabs attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:mainView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0].active = YES; + [NSLayoutConstraint constraintWithItem:tabs attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:mainView attribute:NSLayoutAttributeRight multiplier:1.0 constant:0].active = YES; if (topAlertView) { - [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-0-[topAlertView]-0-[mainView]-0-[progressView]-0-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:nil views:NSDictionaryOfVariableBindings(topAlertView, mainView, progressView)]]; + [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-0-[topAlertView]-0-[mainView]-0-[progressView]-0-[tabs]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:nil views:NSDictionaryOfVariableBindings(topAlertView, mainView, progressView, tabs)]]; } else { - [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-0-[mainView]-0-[progressView]-0-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:nil views:NSDictionaryOfVariableBindings(mainView, progressView)]]; + [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-0-[mainView]-0-[progressView]-0-[tabs]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:nil views:NSDictionaryOfVariableBindings(mainView, progressView, tabs)]]; } + [[self.view.safeAreaLayoutGuide.bottomAnchor constraintEqualToAnchor:tabs.bottomAnchor] setActive:YES]; // Cover View UIView *coverView = [MVMCoreUICommonViewsUtility commonView]; @@ -864,6 +880,50 @@ CGFloat const PanelAnimationDuration = 0.2; [self setupPanels]; } +- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item { + switch (item.tag) { + case 0:{ + MVMCoreRequestParameters *params = [[MVMCoreRequestParameters alloc] initWithPageType:@"myFeed" extraParameters:nil]; + params.loadStyle = MFLoadStyleBecomeRoot; + params.shouldNotAnimatePush = YES; + [[MVMCoreLoadHandler sharedGlobal] loadRequest:params dataForPage:nil delegateObject:nil]; + } + break; + case 1:{ + MVMCoreRequestParameters *params = [[MVMCoreRequestParameters alloc] initWithPageType:@"accountLanding" extraParameters:nil]; + params.loadStyle = MFLoadStyleBecomeRoot; + params.shouldNotAnimatePush = YES; + [[MVMCoreLoadHandler sharedGlobal] loadRequest:params dataForPage:nil delegateObject:nil]; + } + break; + case 2:{ + MVMCoreRequestParameters *params = [[MVMCoreRequestParameters alloc] initWithPageType:@"shopHomePage" extraParameters:nil]; + params.loadStyle = MFLoadStyleBecomeRoot; + params.shouldNotAnimatePush = YES; + [[MVMCoreLoadHandler sharedGlobal] loadRequest:params dataForPage:nil delegateObject:nil]; + } + break; + case 3:{ + MVMCoreRequestParameters *params = [[MVMCoreRequestParameters alloc] initWithPageType:@"loyaltyEligibiltySelector" extraParameters:nil]; + params.loadStyle = MFLoadStyleBecomeRoot; + params.shouldNotAnimatePush = YES; + [[MVMCoreLoadHandler sharedGlobal] loadRequest:params dataForPage:nil delegateObject:nil]; + } + break; + case 4:{ + UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"More" message:nil preferredStyle:UIAlertControllerStyleActionSheet]; + [controller addAction:[UIAlertAction actionWithTitle:@"Bill" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { + [[MVMCoreLoadHandler sharedGlobal] loadRequest:[[MVMCoreRequestParameters alloc] initWithPageType:@"billOverview" extraParameters:nil] dataForPage:nil delegateObject:nil]; + }]]; + [controller addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]]; + [[MVMCoreNavigationHandler sharedNavigationHandler] presentViewController:controller animated:YES]; + } + break; + default: + break; + } +} + - (void)viewDidLoad { [super viewDidLoad]; [self.topAlertView pinATopViewController:self]; diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Account@1x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Account@1x.png new file mode 100644 index 00000000..a77098c2 Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Account@1x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Account@2x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Account@2x.png new file mode 100644 index 00000000..78ddbb80 Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Account@2x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Account@3x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Account@3x.png new file mode 100644 index 00000000..96460782 Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Account@3x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Contents.json b/MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Contents.json new file mode 100644 index 00000000..dd3bd4a8 --- /dev/null +++ b/MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Account@1x.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Account@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Account@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Bag@1x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Bag@1x.png new file mode 100644 index 00000000..08d4e5bd Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Bag@1x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Bag@2x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Bag@2x.png new file mode 100644 index 00000000..640cf1ec Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Bag@2x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Bag@3x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Bag@3x.png new file mode 100644 index 00000000..f621197f Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Bag@3x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Contents.json b/MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Contents.json new file mode 100644 index 00000000..ef86d034 --- /dev/null +++ b/MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Bag@1x.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Bag@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Bag@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Contents.json b/MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Contents.json new file mode 100644 index 00000000..02784f80 --- /dev/null +++ b/MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Home@1x.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Home@1.5x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Home@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Home@1.5x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Home@1.5x.png new file mode 100644 index 00000000..17dc8d96 Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Home@1.5x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Home@1x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Home@1x.png new file mode 100644 index 00000000..dc6f824d Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Home@1x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Home@3x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Home@3x.png new file mode 100644 index 00000000..8d67c801 Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Home@3x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/Contents.json b/MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/Contents.json new file mode 100644 index 00000000..175d1a09 --- /dev/null +++ b/MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "More@1x.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "More@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "More@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/More@1x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/More@1x.png new file mode 100644 index 00000000..fd9bb696 Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/More@1x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/More@2x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/More@2x.png new file mode 100644 index 00000000..158c6636 Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/More@2x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/More@3x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/More@3x.png new file mode 100644 index 00000000..54de11dc Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/More@3x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Contents.json b/MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Contents.json new file mode 100644 index 00000000..11c37b59 --- /dev/null +++ b/MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Verizon Up@1x.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Verizon Up@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Verizon Up@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Verizon Up@1x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Verizon Up@1x.png new file mode 100644 index 00000000..aa034686 Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Verizon Up@1x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Verizon Up@2x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Verizon Up@2x.png new file mode 100644 index 00000000..701c05ff Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Verizon Up@2x.png differ diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Verizon Up@3x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Verizon Up@3x.png new file mode 100644 index 00000000..072a2758 Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Verizon Up@3x.png differ