Skip to content

集成原生的微信、微博、QQ分享和登录,微信和支付宝支付,几行代码轻松搞定。

License

Notifications You must be signed in to change notification settings

JazzPC/ShareAndPayKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShareAndPayKit

集成原生的分享、登录和支付功能,几行代码轻松搞定。

1.配置分享信息,并弹出分享平台选择框

- (IBAction)shareButtonPressed:(UIButton *)sender {
[ShareUtility shareWithUrl:@"http://www.baidu.com" title:@"你好" desc:@"测试分享" icon:[UIImage imageNamed:@"icon"] respVC:self];
}

2.QQ登录功能

[[AuthUtility shareInstance] qqLoginPressed];
[AuthUtility shareInstance].loginBlock = ^(NSDictionary *infoDic) {
//TODO:处理登录逻辑
if (infoDic != nil) {

}else {
NSLog(@"登录失败");
}
};

3.微信登录功能

[[AuthUtility shareInstance] wechatLoginPressed];
[AuthUtility shareInstance].loginBlock = ^(NSDictionary *infoDic) {
//TODO:处理登录逻辑
if (infoDic != nil) {

}else {
NSLog(@"登录失败");
}
};

4.微博登录功能

[[AuthUtility shareInstance] sinaLoginPressed];
[AuthUtility shareInstance].loginBlock = ^(NSDictionary *infoDic) {
//TODO:处理登录逻辑
if (infoDic != nil) {

}else {
NSLog(@"登录失败");
}
};

5.微信支付功能

- (IBAction)wechatPay:(UIButton *)sender {
//FIXME:方法参数需要服务端返回,这里暂时为nil
[[AuthUtility shareInstance] wechatPayPressed:nil];
}

6.支付宝支付功能

- (IBAction)aliPay:(UIButton *)sender {
//FIXME:方法参数需要服务端返回,这里暂时为nil
[[AuthUtility shareInstance] alipayPressed:nil];

}

About

集成原生的微信、微博、QQ分享和登录,微信和支付宝支付,几行代码轻松搞定。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published