Demo
@ -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];
|
||||
|
||||
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Account@1x.png
vendored
Normal file
|
After Width: | Height: | Size: 978 B |
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Account@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Account@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
23
MVMCoreUI/SupportingFiles/Media.xcassets/Account.imageset/Contents.json
vendored
Normal 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"
|
||||
}
|
||||
}
|
||||
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Bag@1x.png
vendored
Normal file
|
After Width: | Height: | Size: 394 B |
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Bag@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 651 B |
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Bag@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 897 B |
23
MVMCoreUI/SupportingFiles/Media.xcassets/Bag.imageset/Contents.json
vendored
Normal 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"
|
||||
}
|
||||
}
|
||||
23
MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Contents.json
vendored
Normal 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"
|
||||
}
|
||||
}
|
||||
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Home@1.5x.png
vendored
Normal file
|
After Width: | Height: | Size: 450 B |
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Home@1x.png
vendored
Normal file
|
After Width: | Height: | Size: 362 B |
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/Home.imageset/Home@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 919 B |
23
MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/Contents.json
vendored
Normal 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"
|
||||
}
|
||||
}
|
||||
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/More@1x.png
vendored
Normal file
|
After Width: | Height: | Size: 134 B |
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/More@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 160 B |
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/More.imageset/More@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 233 B |
23
MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Contents.json
vendored
Normal 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"
|
||||
}
|
||||
}
|
||||
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Verizon Up@1x.png
vendored
Normal file
|
After Width: | Height: | Size: 503 B |
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Verizon Up@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 915 B |
BIN
MVMCoreUI/SupportingFiles/Media.xcassets/Verizon Up.imageset/Verizon Up@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 1.4 KiB |