顶部标签控制器

2018-01-18  本文已影响0人  黄上驾到丶

}

//创建滚动视图

}

}

//数据源方法
//默认1组
//行数

//设置单元格 cell

cell.textLabel.text = arr[indexPath.row];

cell.backgroundColor = [UIColor greenColor];

return cell;

}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

if (indexPath.row == 2)
{
    view1.hidden = YES;
}
else if (indexPath.row == 0)
{
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"确认添加" message:@"操作已成功" preferredStyle:UIAlertControllerStyleAlert];
    
    
    UIAlertAction *action = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        
    }];

        [alert addAction:action];
        
        [self.navigationController presentViewController:alert animated:YES completion:^{
            
        }];
}
else
{
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"确认删除" message:@"操作已成功" preferredStyle:UIAlertControllerStyleAlert];
    
    
    UIAlertAction *action = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        
    }];
    
    [alert addAction:action];
    
    [self.navigationController presentViewController:alert animated:YES completion:^{
        
    }];
}

}

上一篇 下一篇

猜你喜欢

热点阅读