Comments (6)
您好,由于我没有对接过支付宝的SDK,所以冒味问一下调用弹出支付宝网页的代码需要设置window吗?您是通过[UIApplication sharedApplication].windows.firstObject
来获取keyWindow的吗?
from lldark.
您好,由于我没有对接过支付宝的SDK,所以冒味问一下调用弹出支付宝网页的代码需要设置window吗?您是通过
[UIApplication sharedApplication].windows.firstObject
来获取keyWindow的吗?
您好大佬,弹出支付宝网页的代码是支付宝SDK内置调用的,不过我看官网介绍就是[[[UIApplication shareApplication] windows] index:0]
这样获取keyWindow
的,跟您说的一样,请问有什么好的解决方案吗?我改windowLevel
会有什么影响吗?,另外我还发现一个我改完windowLevel
以后statusBar
的颜色不对了不知道跟我修改windowLevel 有没有直接的关系
from lldark.
windowLevel的作用是为了能让LLDarkWindow有效且接收系统主题的改变通知。我之前尝试过修改windowLevel,但是修改完之后会导致LLDarkWindow无法收到系统主题的改变。具体表现为:(假设你当前的系统主题模式是深色模式)当你将APP的主题切换成浅色主题模式后,然后你再将系统的主题模式修改为浅色模式,然后你再将APP的主题切换成“跟随系统”,APP无法显示正确的主题模式。因为你第二步操作“将系统的主题模式修改为浅色模式”时系统会调用主题修改的代理方法。
您如果修改了windowLevel,建议按照以上测试流程测试一下APP从“非跟随系统”切换到“跟随系统”后是否正常(注:系统的主题模式要发生改变)。如果没有问题的话则没事。
正常情况下确实可以这样获取keyWindow[[[UIApplication shareApplication] windows] index:0]
,您提到的支付宝SDK弹出网页,如果您可以传递keyWindow的话,您可以尝试通过UIApplication.sharedApplication.delegate
获取AppDelegate
实例对象,然后通过这个实例对象获取它的window对象。如果还不能解决问题的话请您联系我,我会加急处理一下您的问题。
from lldark.
windowLevel的作用是为了能让LLDarkWindow有效且接收系统主题的改变通知。我之前尝试过修改windowLevel,但是修改完之后会导致LLDarkWindow无法收到系统主题的改变。具体表现为:(假设你当前的系统主题模式是深色模式)当你将APP的主题切换成浅色主题模式后,然后你再将系统的主题模式修改为浅色模式,然后你再将APP的主题切换成“跟随系统”,APP无法显示正确的主题模式。因为你第二步操作“将系统的主题模式修改为浅色模式”时系统会调用主题修改的代理方法。
您如果修改了windowLevel,建议按照以上测试流程测试一下APP从“非跟随系统”切换到“跟随系统”后是否正常(注:系统的主题模式要发生改变)。如果没有问题的话则没事。
正常情况下确实可以这样获取keyWindow
[[[UIApplication shareApplication] windows] index:0]
,您提到的支付宝SDK弹出网页,如果您可以传递keyWindow的话,您可以尝试通过UIApplication.sharedApplication.delegate
获取AppDelegate
实例对象,然后通过这个实例对象获取它的window对象。如果还不能解决问题的话请您联系我,我会加急处理一下您的问题。
keyWindow是传递不了的,我现在的做法是在调支付的时候修改了下windowLevel,支付完成后再修改回来windowLevel,不知道有没有更好的解决办法
from lldark.
如果您这样做不能解决您当前的问题请您告知我,我将加急处理。
如果这样可以修改您的问题的话您可以先暂时这样改,我会把您遇到的这个问题在下个版本中进行修复。
from lldark.
如果您这样做不能解决您当前的问题请您告知我,我将加急处理。
如果这样可以修改您的问题的话您可以先暂时这样改,我会把您遇到的这个问题在下个版本中进行修复。
目前可以暂时解决,但是还是希望大佬可以尽快更新版本,3Q
from lldark.
Related Issues (17)
- appearanceBindUpdater和themeDidChange感觉很类似 HOT 3
- 可以为UIActivityIndicatorView和UIVisualEffectView添加支持暗黑模式吗? HOT 2
- 支持swift吗 HOT 3
- YYLable切换颜色时,无法生效 HOT 3
- 小小建议 😊 HOT 2
- 项目里有灰色模式,获取CALayer的颜色(themeCGColor转换之后的颜色)进行灰度转换时,报错 HOT 5
- CAGradientLayer的colors不使用themeColor创建颜色时,切换手机的暗黑模式,会导致颜色丢失 HOT 2
- setUserInterfaceStyle在Swift里失灵 HOT 2
- 在tableview/collection中的cell富文本label主题更改未生效 HOT 2
- 引入LLDark导致preferredStatusBarStyle不执行 HOT 5
- 状态栏修改无无效 HOT 9
- 不是深色模式但是字体颜色变了 HOT 1
- UIApplication.sharedApplication.windows.first 受到影响,导致一些弹窗失效 HOT 1
- bugly 监控到的crash大佬知道是什么原因吗?发生了50多次 HOT 1
- UIViewController的方法交换导致的问题 HOT 1
- iOS15.3.1频繁切换深色模式和浅色模式,部分页面的部分控件会出现颜色相反的情况
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lldark.