Toast appears behind keyboard on iOS 11
Closed this issue ยท 20 comments
T.T
Any solution?
Same here
Same thing happen, any idea ?
not yet unfortunately I'm using this lib for now till this one get fixed
https://github.com/scalessec/Toast-Swift
Hey, @Mahan3340 Got Solution. just Replace the code with ToastWindow.shared.addSubview(self.view) to UIApplication.shared.windows[UIApplication.shared.windows.count - 1].addSubview(self.view) top most window.
@raj-zealous I did so but now its not showing any toast at all :-/
@raj-zealous @Mahan3340 It fixed the problem in my case - could you please update the code - or do you want me to supply a PR?
Hey guys, sorry for delay. #124 is a patch for this issue. Please try and let me know if it works!
Podfile
pod 'Toaster', :git => 'https://github.com/devxoul/Toaster.git', :branch => 'ios-11-above-keyboard'
then
$ pod install
I have updated to ios-11-above-keyboard and have a problem
it shows toast over keyboard but it crashes when keyboard dismissed. (self.view.endEditing(true))
same here for keyboard crash ++
@tusecani @Mahan3340 Thanks for reporting. I could reproduce the same bug. I'm currently look for it. I'll update the PR when I find a solution!
@devxoul Hey, I'll appreciate that if you could fix this sooner as we are about to release a version soon ๐
@tusecani is there any update on this issue? It would be great to see some solution, the current fix does not work at 11.2 unfortunately. Thanks!
I couldn't make enough spare time for this issue. Help is always welcomed.
Hi, I can try to solve and then create a new PR!
ํ ์คํธ๊ฐ ์ฌ๋ผ์ง ์ดํ์๋ ๊ณ์ key window๊ฐ ToastWindow์ธ ์ํ๋ก ๋จ์ ์๋ ๊ฒฝ์ฐ๊ฐ ์์ด ๋ฉ์ธ window๋ฅผ ๋ค์ key window๋ก ๊ต์ฒดํ ํ์ ํค๋ณด๋๊ฐ ์ ์ฌ๋ผ์ค๋ ๊ฒ์ ํ์ธํ์ต๋๋ค.
์ฐธ๊ณ ํ์ฌ ์์ ํด ์ฃผ์๋ฉด ๋ ๋ฏ ํฉ๋๋ค : ]
์๋๋ฉด, ์ ๊ฐ ์กฐ๋ง๊ฐ PR์ ์์ฑํด ๋ณผ๊ฒ์!!
After reviewing and testing everybody's solutions, I came up with a non-crashing, always working, solution: #135.