That points to another issue with the forum: self marking as correct answer should not score reputation points. Just mark the thread. All we can do presently is to report as spam as soon as we see it.
So you want to detect there is something on the screen, don't care what it is ? In case a finger is pressing screen, do you want to consider it as an object on screen ?
I read your code but cannot find which TextField. Is it UserName or Password or both or other ? Do you know where exactly the crash occurs ? How is ppbank_VERSION defined when it crashes (does it go through this part of code or not ?)
Hard to say without seeing the original. Could you show the plain CardView on screen ? Maybe the difference is caused by padding. Try to comment them out and see what you get.
A key thing to remember is that SwiftUI works by managing view states. with this in mind, everything gets much clearer. Please tell if it doesn't work as intended. Otherwise good continuation and don't forget to close the thread on the correct answer.
That points to another issue with the forum: self marking as correct answer should not score reputation points. Just mark the thread. All we can do presently is to report as spam as soon as we see it.
So you want to detect there is something on the screen, don't care what it is ? In case a finger is pressing screen, do you want to consider it as an object on screen ?
I read your code but cannot find which TextField. Is it UserName or Password or both or other ? Do you know where exactly the crash occurs ? How is ppbank_VERSION defined when it crashes (does it go through this part of code or not ?)
Hard to say without seeing the original. Could you show the plain CardView on screen ? Maybe the difference is caused by padding. Try to comment them out and see what you get.
A key thing to remember is that SwiftUI works by managing view states. with this in mind, everything gets much clearer. Please tell if it doesn't work as intended. Otherwise good continuation and don't forget to close the thread on the correct answer.