devxoul/Toaster

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์„ ์ƒ์„ฑํ•ด ๋ณผ๊ฒŒ์š”!!

Coeur commented

After reviewing and testing everybody's solutions, I came up with a non-crashing, always working, solution: #135.

Hey guys, sorry for delay. I updated the implementation of #124. I'd be really appreciate if you can test it on your app. Unfortunately my machine doesn't work with iOS 9 simulator after upgrading my mac to macOS Mojave :(

@devxoul tested it working fine in iOS 11.4 thanks