ToolHelper.m 1.75 KB
Newer Older
曹云霄's avatar
曹云霄 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
//
//  ToolHelper.m
//  Lighting
//
//  Created by 曹云霄 on 2017/3/31.
//  Copyright © 2017年 上海勾芒科技有限公司. All rights reserved.
//

#import "ToolHelper.h"
#import <Bugly/Bugly.h>

@implementation ToolHelper


/**
 加载第三方工具
 */
+ (void)startLoad {
    
    [[self class] setUpUMShare];
    [[self class] setUpBugly];
    [[self class] setKeyboard];
}

#pragma mark - 友盟
+ (void)setUpUMShare
{
    /* 打开调试日志 */
    [[UMSocialManager defaultManager] openLog:YES];
    /* 设置友盟appkey */
    [[UMSocialManager defaultManager] setUmSocialAppkey:@"574bc8fee0f55a4edb001078"];
    /* 设置微信的appKey和appSecret */
    [[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_WechatSession appKey:@"wxab385878d9441f23" appSecret:@"58b85af13973bdf597fa807208ac0dff" redirectURL:@"http://mobile.umeng.com/social"];
    /* 设置微信朋友圈的appKey和appSecret */
    [[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_WechatTimeLine appKey:@"wxab385878d9441f23" appSecret:@"58b85af13973bdf597fa807208ac0dff" redirectURL:@"http://mobile.umeng.com/social"];
    /* 设置新浪的appKey和appSecret */
    [[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_Sina appKey:@"1111393286"  appSecret:@"5d011c05122b5539ec9592372f944d3c" redirectURL:@"https://sns.whalecloud.com/sina2/callback"];
}

#pragma mark - Bugly
+ (void)setUpBugly
{
    [Bugly startWithAppId:@"900033734"];
}


#pragma mark - 键盘
+ (void)setKeyboard
{
    IQKeyboardManager *manager = [IQKeyboardManager sharedManager];
    [[IQKeyboardManager sharedManager]setKeyboardDistanceFromTextField:0];
    manager.enable = YES;
    manager.shouldResignOnTouchOutside = YES;
    manager.enableAutoToolbar = NO;
}









@end