翻来覆去都找不到这个问题的答案。简单地说,是否可以自定义 Phonegap InAppBrowser 中的“完成”按钮颜色以及箭头颜色? iOS7 上它们似乎默认为蓝色。想让它们变白。谢谢。
最佳答案
请注意,如果您更新代码行以更改 setCloseButtontitle() 函数内“完成”按钮的颜色,并且不传入 closebuttoncaption JS 调用中的参数
没有 setCloseButtontitle() 的示例
ref = window.open(link, '_blank', 'location=no');
setCloseButtontitle()示例
ref = window.open(link, '_blank', 'location=no,closebuttoncaption=Close Window');
那么按钮颜色就不会改变,所以我建议在下面的函数代码后面添加一行代码来改变按钮的颜色:
if (browserOptions.closebuttoncaption != nil) {
[self.inAppBrowserViewController setCloseButtonTitle:browserOptions.closebuttoncaption];
}
//add this here so it will change the color of the button regardless of the browserOptions.closebuttoncaption being passed
self.inAppBrowserViewController.closeButton.tintColor =[UIColor whiteColor];
关于cordova - 如何更改 Phonegap InAppBrowser 的按钮颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19718867/