zoukankan      html  css  js  c++  java
  • 横向滚动的UITableView

    横向滚动的UITableView

    1.实现思路

    旋转tableview,90度,cell也旋转90度,

    上代码:

     1     _tableView.transform =CGAffineTransformMakeRotation(-M_PI /2);
     2 
     3 //delegate
     4 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
     5 {
     6     UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"identifier"];
     7     if (cell == nil) {
     8         cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"identifier"];
     9         cell.backgroundColor =[UIColor groupTableViewBackgroundColor];
    10         cell.textLabel.text=@"都好好的";
    11         // cell顺时针旋转90度
    12         cell.contentView.transform = CGAffineTransformMakeRotation(M_PI / 2);
    13     }
    14     
    15     return cell;
    16 }
    IOS开发
  • 相关阅读:
    QuickContactBadge
    第一周——15选1
    UVA 10036 Divisibility
    POJ 3984 迷宫问题
    POJ 3258 River Hopscotch
    CodeForces 230A Dragons
    HDU 4450 Draw Something
    POJ 2485(PRIME算法)
    HDU 1213
    CodeForces 16E
  • 原文地址:https://www.cnblogs.com/luanmage/p/5075214.html
Copyright © 2011-2022 走看看