//
|
// ViewController.m
|
// HDLSceneSiriDemo
|
//
|
// Created by 陈嘉乐 on 2021/11/17.
|
//
|
|
#import "ViewController.h"
|
#import "HDLSiriSceneListViewController.h"
|
#import "HDLSiriSceneModel.h"
|
|
@interface ViewController ()
|
|
@end
|
|
@implementation ViewController
|
|
- (void)viewDidLoad {
|
[super viewDidLoad];
|
// Do any additional setup after loading the view.
|
}
|
|
-(void)gotoSiriSceneListViewController{
|
NSMutableArray *list = [NSMutableArray new];
|
for(int i = 0; i<10; i++){
|
HDLSiriSceneModel *model = [[HDLSiriSceneModel alloc] init];
|
model.name = [NSString stringWithFormat:@"回家模式%d",i];
|
model.userSceneId = [NSString stringWithFormat:@"userSceneId%d",i];
|
[list addObject:model];
|
}
|
|
HDLSiriSceneListViewController *vc = [[HDLSiriSceneListViewController alloc] init];
|
vc.dataSource = list;
|
[self.navigationController pushViewController:vc animated:YES];
|
|
}
|
- (IBAction)gotoSiriPage:(id)sender {
|
[self gotoSiriSceneListViewController];
|
}
|
|
@end
|