The iPhone's proximity sensor is one of its handier built-in features ... lock button until you see the Apple logo. On an iPhone 7 or 7 Plus, press and hold the volume down and power/lock buttons ...