Last Updated on : 2024-06-05 09:59:33download
The switch control panel library ThingSmartSwitchPanelKit
provides APIs for apps on iOS 9.0 or later. Control panels for switches are developed based on native code and support all switch categories.
Lightweight and free of frameworks such as React Native.
Support all switch categories and apply to new products without app launching.
Facilitate debugging during development.
If the SDK ThingSmartHomeKit
has been integrated into your project, perform the following steps to configure and use the panel library:
Add the following line to the Podfile.
pod 'ThingSmartSwitchPanelKit'
Add the following code block to the home page where devices are listed.
Objective-C:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
ThingSmartDeviceModel *deviceModel = self.home.deviceList[indexPath.row];
ThingSmartSwitchManager *manager = [[ThingSmartSwitchManager alloc] initWithDeviceId:deviceModel.devId];
[self.navigationController pushViewController:manager.viewController animated:YES];
}
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback