Last Updated on : 2024-06-05 09:44:38download
The Air Conditioning Category Control Panel is a control panel developed by native code, which supports all kinds of air conditioning equipment.
TuyaSmartAirConditionerPanelKit
is an application interface based on IOS 9.0 and above. If the SDK you are currently accessing is TuyaSmartHomeKit
, please follow the following steps to configure and use.
Add the following code to the podfile file.
pod 'TuyaSmartAirConditionerPanelKit'
Add the following code to the index page (device list page):
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
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback