更新时间:2024-06-24 06:42:43下载pdf
插座品类控制面板 TuyaSmartSocketPanelKit
是一套基于 iOS 9.0 及以上版本设备的应用程序接口。该面板使用原生代码( Native )开发而成,支持绝大多数涂鸦系智能产品以及功能点控制,通过简单接入即可快速集成完整的涂鸦生态产品能力。
可以提前支持新产品,并且在单品类无法支持的情况下提供服务。
原生代码,接入就可以使用。
便于开发阶段调试。
支持通过配置展示。详细步骤可参考 自由配置模板使用指南。
使用 CocoaPods 将 TuyaSmartSocketPanelKit
集成到您的项目中。
将以下代码添加到 Podfile
中。
pod 'TuyaSmartSocketPanelKit'
在您的首页(即设备列表页)加入以下代码。
#import "DeviceListViewController.h"
#import <TuyaSmartSocketPanelKit/TuyaSmartSocketPanelKit.h>
@implementation DeviceListViewController.h
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
TuyaSmartDevice *device = self.deviceList[indexPath.row];
// ...
TuyaSmartSocketManager *manager = [[TuyaSmartSocketManager alloc] initWithDeviceId:device.deviceModel.devId];
[self.navigationController pushViewController:manager.viewController animated:YES];
}
@end
该内容对您有帮助吗?
是意见反馈该内容对您有帮助吗?
是意见反馈