JLChen
2021-11-17 1c6fec7f66cb4864eb4cc17ac8c529dc05e6995d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
//  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