1.首先去info.plist 设置:

2.代码
NSURL *url = [NSURL URLWithString:@"App-Prefs:root=TOUCHID_PASSCODE"];
if ([[UIApplication sharedApplication] canOpenURL:url])
{
[[UIApplication sharedApplication] openURL:url];
}
其它设置界面同理,url换成对应系统界面的参数 即可。
3.touch id 代码示例
- (void)touchID {
LAContext *context = [[LAContext alloc]init];
NSError *error = nil;
if ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) {
[context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
localizedReason:@"为了保证数据安全性,必须开启指纹认证才能使用,谢谢!"
reply:^(BOOL success, NSError *error) {
if (error) {
NSLog(@"操作失败");
}
if (success) {
NSLog(@"验证成功");
} else {
NSLog(@"验证失败");
}
}];
} else {
NSLog(@"TouchID设备不可用");
}
}
更多参数:
About — App-Prefs:root=General&path=About Accessibility — App-Prefs:root=General&path=ACCESSIBILITY AirplaneModeOn— App-Prefs:root=AIRPLANE_MODE Auto-Lock — App-Prefs:root=General&path=AUTOLOCK Brightness — App-Prefs:root=Brightness Bluetooth — App-Prefs:root=General&path=Bluetooth Date& Time — App-Prefs:root=General&path=DATE_AND_TIME FaceTime — App-Prefs:root=FACETIME General— App-Prefs:root=General Keyboard — App-Prefs:root=General&path=Keyboard iCloud — App-Prefs:root=CASTLE iCloud Storage & Backup — App-Prefs:root=CASTLE&path=STORAGE_AND_BACKUP International — App-Prefs:root=General&path=INTERNATIONAL Location Services — App-Prefs:root=LOCATION_SERVICES Music — App-Prefs:root=MUSIC Music Equalizer — App-Prefs:root=MUSIC&path=EQ Music VolumeLimit— App-Prefs:root=MUSIC&path=VolumeLimit Network — App-Prefs:root=General&path=Network Nike + iPod — App-Prefs:root=NIKE_PLUS_IPOD Notes — App-Prefs:root=NOTES Notification — App-Prefs:root=NOTIFICATIONS_ID Phone — App-Prefs:root=Phone Photos — App-Prefs:root=Photos Profile — App-Prefs:root=General&path=ManagedConfigurationList Reset — App-Prefs:root=General&path=Reset Safari — App-Prefs:root=Safari Siri — App-Prefs:root=General&path=Assistant Sounds — App-Prefs:root=Sounds SoftwareUpdate— App-Prefs:root=General&path=SOFTWARE_UPDATE_LINK Store — App-Prefs:root=STORE Twitter — App-Prefs:root=TWITTER Usage — App-Prefs:root=General&path=USAGE VPN — App-Prefs:root=General&path=Network/VPN Wallpaper — App-Prefs:root=Wallpaper Wi-Fi — App-Prefs:root=WIFI Setting—App-Prefs:root=INTERNET_TETHERING