You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When have a new window like custom alertsheet it will some bug
rootViewController and keyWindow should be weak not strong
otherwise keyWindow cannot be release
Can you provide me sample app which demonstrate this issue. So I will be able to understand what exactly the issue was and able to solve it universally.
When have a new window like custom alertsheet it will some bug
rootViewController and keyWindow should be weak not strong
otherwise keyWindow cannot be release
当有一个新的Window的时候比如自定义带输入框的弹出框,就会有BUG,输入框高度不变,底下的View却被提上去了,另外如果属性不改成weak会造成退出alertView后界面点击不了,无法进行任何操作,因为弹出框的Window不能释放。
@Property(nonatomic, weak, readonly) UIViewController *rootViewController;
@Property(nonatomic, weak, readonly) UIWindow *keyWindow;
-(UIViewController *)rootViewController
{
// if (_rootViewController == nil)
_rootViewController = [[self keyWindow] rootViewController];
return _rootViewController;
}
-(UIWindow *)keyWindow
{
// if (_keyWindow == nil)
_keyWindow = [[UIApplication sharedApplication] keyWindow];
return _keyWindow;
}
this code work for me.
我改成上面的代码后就成功了,不过没有测试对其它功能的影响。理论上没有什么副作用。
The text was updated successfully, but these errors were encountered: