I 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).
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)