Cordova闪屏改变了微调器的位置? [英] Cordova splash screen change the position of the spinner?

查看:120
本文介绍了Cordova闪屏改变了微调器的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何修改Cordova闪屏微调器的位置?我检查了文档,找不到任何信息。

Does anyone know how to modify the position of the Cordova splash screen spinner? I have checked the documentation and couldn't find any information.

推荐答案

好的我想通了,不得不手动编辑/ plugins /里面的iOS插件文件CDVSplashScreen.m科尔多瓦 - 插件,闪屏/ src目录/ IOS。

Ok I figured it out, had to manually edit the iOS plugin file "CDVSplashScreen.m" found inside "/plugins/cordova-plugin-splashscreen/src/ios".

_activityView.center = CGPointMake(parentView.bounds.size.width / 2, parentView.bounds.size.height / 2 + 75);

这样做会使微调器从屏幕中心向下75像素。所以+75走向屏幕的底部-75会反过来。

What that does is makes the spinner 75 pixels lower from the centre of the screen. so "+75" goes towards the bottom of the screen "-75" would do the opposite.

希望这可以帮助其他人(但不难发现)。

Hope this helps someone else out there (but wasn't to hard to figure out).

另外如果你想改变微调器的颜色。有3个选项可供选择(不知道如何更改颜色)。

Additionally if you want to change the colour of the spinner. There are 3 options to choose from (no idea how to change the colour).

灰色(默认 - 搜索此行):

UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray

white

UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhite; 

whiteLarge

UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhiteLarge

发现于文件:

/*
 * The Activity View is the top spinning throbber in the status/battery bar. We init it with the default Grey Style.
 *
 *     whiteLarge = UIActivityIndicatorViewStyleWhiteLarge
 *     white      = UIActivityIndicatorViewStyleWhite
 *     gray       = UIActivityIndicatorViewStyleGray
 *
 */

这篇关于Cordova闪屏改变了微调器的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆