//请通过测方法完成悬浮窗的初始化
//传递CGPointZero参数则显示在默认左下角位置, 也可以传入其他位置参数, 但是要注意避开iPhone的刘海区域
NGADragBallView *dragBallView = [NGADragBallView dragBallViewWithPosition:CGPointZero];
//设置悬浮窗中分享按钮的功能
dragBallView.openShare = YES; //开启分享功能
[dragBallView setupShareAction:@selector(share) onTarget:self];
/*
- (void)share{
//分享代码, 具体实现参考Demo代码并结合分享方式
}
*/
//开启discord
dragBallView.openDiscord = YES;
//在需要的情况下更新Discord URL
[dragBallView updateDiscordURL:[NSURL URLWithString:@"http://...."]];
//开启客服功能并设置玩家姓名参数便于提交相关表单信息
dragBallView.openForum = YES; //开启Support功能
//显示
[AppRootViewController.view addSubView:dragBallView];
//关闭
[dragBallView removeFromSuperview];
//显示
[dragBallView showPopView];
//关闭
[dragBallView closePopView];
NGALoginSDKStrings.bundle中存放着界面UI及部分提示用语的本地化.
"B_Bind" = "帳號管理"; //账号按钮
"B_Discord" = "Discord"; //Discord按钮
"B_Facebook" = "分享"; //分享按钮
"B_Support" = "客服"; //客服支援按钮