Hacker News new | comments | show | ask | jobs | submit login

I looked into how SnapChat does it, it's pretty simple: http://blog.chpwn.com/post/38491252231

Oooh, thanks for the explanation. I figured it had something to do with touches dropping off (the other posts mentioned it, and it's kind of obvious since they ask you to long press to view). But I thought the touchesCancelled would be too unreliable, with push messages, system notifications, incoming calls, or just dragging the finger out of the screen.

How would you detect the lack of WillEnterBackground/DidResignActive to avoid false positives? Just set a timeout and send a "screenshot!" notification if the timeout expires without going to background?

Yeah, probably. Anything that gets in front of the app should call one of those two, and do so pretty immediately. A timer for a second or so later should be pretty safe.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact