4 ms·
I'm pretty sure Snapchat actually does this by just checking to see if you hit the shortcut for taking a screenshot (home button + power button)
by jc4p 14y ago
I'm pretty sure Snapchat actually does this by just checking to see if you hit the shortcut for taking a screenshot (home button + power button)
- pavel_lishin 14y agoApparently they check for something else: http://blog.chpwn.com/post/38491252231 http://blog.chpwn.com/post/38491252231
- prezjordan 14y agoI do not believe the iOS SDK has access to these buttons. As other users have pointed out, screenshot detection is a hacky method of checking if touch interaction is temporarily disabled (which only(?) occurs during a screenshot).
- wattson12 14y agoiOS gives no access to these buttons. It looks as though this code just polls the photo library and checks if a new photo was created. There was a different version going around earlier which checked for touches being disabled, which happens during a screenshot (but this not the only time iOS does this, I know it happens during the standard navigation "push" animation, and wouldn't be surprised if there were quite a few other standard system actions which disable touches)