iOS UITableView 瀑布流/ 旋转90

经常看见一个页面 三列图片 每一列的图片的大小都不一样  怎么实现的呢 ?可以用瀑布流 。。

这里简单说一下  日后再详细 补上  见谅了 。。。

//主要核心就是  三个并排的 UITableView 放在页面上  
// 并且实现  滑动一个另外两个也要滑动 就是联动效果:
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{

NSArray *array = [[NSArray alloc] initWithObjects:tableView1,tableView2,tableView3, nil];
    for ( UIScrollView *s in array)) {
        if (s != scrollView) {
            s.contentOffset = scrollView.contenOffset;
        }
    }
 }   

顺便说一下cell 复用 :

UserCell* cell = [tableView dequeueReusableCellWithIdentifier:@"ID"];
    if (cell == nil) {
        cell = [[[UserCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"ID"] autorelease];
    }
    
    
    
    
旋转90 
tableViews = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
CGPoint pointCenter = tableViews.center;//记住旋转前的Center
tableViews.transform = CGAffineTransformMakeRotation(-M_PI /2);//逆时针旋转90
tableViews.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
tableViews.center = pointCenter;//重新定义Center


转载于:https://my.oschina.net/liuchuanfeng/blog/204770

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值