> The app knowing I took a screenshot feels adjacent to me to a keylogger.
That is what this article is about and why you should read it before commenting. The whole point is that it doesn't need to know you're taking screenshots. That's why it's a clever trick.
But for completeness, iOS apps can detect screenshots. That’s what allows them to show annoying popups with a share option when you take a screenshot.