// // MusicSetPage.m // pregnancy_guard // // Created by WindShan on 2017/7/12. // Copyright © 2017年 WindShan. All rights reserved. // #import "MusicSetPage.h" #import "MusicPlayCell.h" #import "HotelAccount.h" @interface MusicSetPage () @property(nonatomic,strong) UITableView * tableView; @property (nonatomic, strong) NSMutableArray *modelArray; @end @implementation MusicSetPage - (UITableView *)tableView { if (!_tableView) { _tableView = [[UITableView alloc] init]; _tableView.delegate = self; _tableView.dataSource = self; //_tableView.separatorColor = [UIColor clearColor]; [self.view addSubview:_tableView]; [_tableView mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.mas_equalTo(UIEdgeInsetsMake(0 , 0, 0, 0)); }]; _tableView.tableFooterView = [UIView new]; } return _tableView; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return self.modelArray.count; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 50.0; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"MusicSetCell"; MusicPlayCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[MusicPlayCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier]; } HotelAccount * model = [self.modelArray objectAtIndex:indexPath.row]; [cell setItemView:model]; return cell; } -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger index = [indexPath row]; // 跳转酒店备用界面 // 跳转选择酒店 //HotelSelPage* page = [[HotelSelPage alloc] initIsFirstPage:NO]; //page.bSelRoom = 2; // 跳转界面 //BaseNaviController *baseNav = [[BaseNaviController alloc] initWithRootViewController:page]; //[self presentViewController:baseNav animated:YES completion:nil]; //[self showActionForPhoto]; } - (void)musicPlaySection:(HotelAccount*)model { } /* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ @end