Set up shortcuts
Function table
__IDO_FUNCTABLE__.funcTable18Model.shortcut
Description of shortcut model
- IDOSetShortcutInfoBluetoothModel
Parameter | Description | Remark |
---|---|---|
shortcutType | Shortcut Type | 0:Invalid,1:Photograph,2:Sport mode,3:Do not disturb mode |
Command code
Objc:
IDOSetShortcutInfoBluetoothModel * model = [IDOSetShortcutInfoBluetoothModel currentModel];
[IDOFoundationCommand setShortcutCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetShortcutInfoBluetoothModel.current();
IDOFoundationCommand.setShortcut(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};