空调品类控制面板

更新时间:2024-06-24 06:42:17下载pdf

空调品类控制面板基于原生代码开发,支持所有空调品类设备的控制面板。

功能优势

  • 轻量级,不含 React Native 等框架
  • 支持所有空调品类设备,新品提前支持,无需发版
  • 便于开发阶段调试

    空调品类控制面板 空调品类控制面板

打开空调品类控制面板

空调品类控制面板TuyaSmartAirConditionerPanelKit是一套基于iOS 9.0及以上版本设备的应用程序接口,如果您目前接入的SDK是TuyaSmartHomeKit,请按下列步骤进行配置并使用。

  1. 将以下代码加入Podfile文件。

    pod 'TuyaSmartAirConditionerPanelKit'
    
  2. 在您的首页(设备列表页)加入以下代码:

    Objective-C:

    #import "DeviceListViewController.h"
    #import <TuyaSmartAirConditionerPanelKit/TuyaSmartAirConditionerPanelKit.h>
    
    @implementation DeviceListViewController.h
    
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    	[tableView deselectRowAtIndexPath:indexPath animated:YES];
    	TuyaSmartDevice *device = self.deviceList[indexPath.row];
    	
    	// ...
    	TuyaSmartAirConditionerManager *manager = [[TuyaSmartAirConditionerManager alloc] initWithDeviceId:device.deviceModel.devId];
    	[self.navigationController pushViewController:manager.viewController animated:YES];          
    }
    
    @end