This commit is contained in:
Pfeil, Scott Robert 2020-03-28 19:28:26 -04:00
parent 16b9e5fb1f
commit 73226d45a2
21 changed files with 177 additions and 2 deletions

View File

@ -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];

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

View File

@ -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"
}
}

View File

@ -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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 919 B

View File

@ -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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

View File

@ -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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB