Law enforcement cannot force you to diverge your passcode (“something you know”), but they can force you to unlock with a finger or face (“something you possess”).
There’s a quick way to lock your iPhone in the event police stop you. It’s called the “Cop Button” in the older iPhones with the touch button. Tap the power button quickly 5 times.
Alternately, in new iPhones, hold the right and either left buttons for 3 seconds. Now your phone will not unlock without a passcode.
iOS 11 has a ‘cop button’ to temporarily disable Touch ID
Apple is adding an easy way to quickly disable Touch ID in iOS 11. A new setting, designed to automate emergency services calls, lets iPhone users tap the power button quickly five times to call 911. This doesn’t automatically dial the emergency services by default, but it brings up the option to and also temporarily disables Touch ID until you enter a passcode.