iOS Friends League stats

Source: Internet
Author: User

Recently has been busy version of the big change so I want to share the things did not write to blog today to share the use of the Friends of the Union statistics 1. Download SDK 2. Method Encapsulation 3. Call in the appropriate place

We set up a base class controller in the project Baseviewcontroller because then we put the statistical method into the subclass naturally has statistical function I don't write statistical methods specifically for a click event, but the basic truth is,

Create a class to write statistical methods that can be copied out using

#import <Foundation/Foundation.h>

@interface Umutils:nsobject

Configure Friend League

+ (void) umregister;///////need us to implement in Appdelegate [Umutils umregister];//Allies

Account Statistics

+ (void) Useraccountwithpuid: (NSString *) puid;////////incoming you want to count the account generally when the login is successful when the mobile phone number or user name in the

Page statistics are used in-(void) Viewwillappear: (BOOL) animated

+ (void) Beginlogpageview: (NSString *) pageName;

Page statistics are used in-(void) Viewwilldisappear: (BOOL) animated

+ (void) Endlogpageview: (NSString *) pageName;

Account does not send account content when exiting login

+ (void) userloginout;///////////call not send account information when exiting login

@end

Realize

#import "UMUtils.h"

#import <UMMobClick/MobClick.h>

@implementation Umutils

+ (void) umregister{

[Email protected] "You apply for the friend League Appkey";

[Email protected] "App Store";

[Mobclick startwithconfigure:umconfiginstance];

}

+ (void) Useraccountwithpuid: (NSString *) puid{

[Mobclick Profilesigninwithpuid:puid];

}

+ (void) Beginlogpageview: (NSString *) pagename{

[Mobclick Beginlogpageview:pagename];

}

+ (void) Endlogpageview: (NSString *) pagename{

[Mobclick Endlogpageview:pagename];

}

+ (void) userloginout{

[Mobclick Profilesignoff];

}

iOS Friends League stats

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.