Merge pull request #674 from VladiMihaylenko/vm-master

[ios] Added statistics to what's new.
This commit is contained in:
igrechuhin 2015-11-23 18:15:25 +03:00
commit c89f301090
3 changed files with 8 additions and 1 deletions

View file

@ -1,9 +1,11 @@
#import "MWMPageController.h"
#import "MWMWhatsNewController.h"
#import "Statistics.h"
static NSString * const kPageViewControllerStoryboardID = @"PageViewController";
static NSString * const kContentViewControllerStoryboardID = @"PageContentController";
static NSUInteger const kNumberOfPages = 2;
extern NSString * const kUDWhatsNewWasShown;
@protocol MWMPageControllerDataSource <UIPageViewControllerDataSource>
@ -103,6 +105,7 @@ NS_CLASS_AVAILABLE_IOS(8_0) @interface MWMPageControllerDataSourceImpl : NSObjec
- (void)close
{
[[Statistics instance] logEvent:kStatEventName(kStatWhatsNew, kUDWhatsNewWasShown) withParameters:@{kStatAction : kStatClose}];
[self.iPadBackgroundView removeFromSuperview];
[self.view removeFromSuperview];
[self removeFromParentViewController];
@ -110,11 +113,13 @@ NS_CLASS_AVAILABLE_IOS(8_0) @interface MWMPageControllerDataSourceImpl : NSObjec
- (void)nextPage
{
[[Statistics instance] logEvent:kStatEventName(kStatWhatsNew, kUDWhatsNewWasShown) withParameters:@{kStatAction : kStatNext}];
[self setViewControllers:@[[self.pageControllerDataSource viewControllerAtIndex:1]] direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:nil];
}
- (void)show
{
[[Statistics instance] logEvent:kStatEventName(kStatWhatsNew, kUDWhatsNewWasShown) withParameters:@{kStatAction : kStatOpen}];
if (IPAD)
[self.parent.view addSubview:self.iPadBackgroundView];
[self.parent addChildViewController:self];

View file

@ -34,7 +34,7 @@
#import "../../../private.h"
extern NSString * const kAlohalyticsTapEventKey = @"$onClick";
static NSString * const kUDWhatsNewWasShown = @"WhatsNewWithTTSAndP2PWasShown";
extern NSString * const kUDWhatsNewWasShown = @"WhatsNewWithTTSAndP2PWasShown";
extern char const * kAdForbiddenSettingsKey;
extern char const * kAdServerForbiddenKey;

View file

@ -62,6 +62,7 @@ static NSString * const kStatMoreApps = @"More apps";
static NSString * const kStatMyPosition = @"My position";
static NSString * const kStatName = @"Name";
static NSString * const kStatNavigationDashboard = @"Navigation dashboard";
static NSString * const kStatNext = @"Next";
static NSString * const kStatNo = @"No";
static NSString * const kStatOff = @"Off";
static NSString * const kStatOn = @"On";
@ -113,6 +114,7 @@ static NSString * const kStatUpdateAll = @"Update all";
static NSString * const kStatValue = @"Value";
static NSString * const kStatVehicle = @"Vehicle";
static NSString * const kStatVisible = @"Visible";
static NSString * const kStatWhatsNew = @"What's New";
static NSString * const kStatYes = @"Yes";
static NSString * const kStatZoom = @"Zoom";
static NSString * const kStatiPad = @"iPad";