Horizontal scrolling of UITableview [duplicate]

橙三吉。 提交于 2019-12-25 02:18:47

问题


Possible Duplicate:
Horizontal UITableView
Horizontal scrolling UITableView

Can we scroll a tableview horizontally in iphone? I have a tableview with four columns. Can I scroll it horizontally to show the values? Thanks in advance


回答1:


After a quick Google search I came up with a result. Check this thread out and the answers within it to see if you find it helpful, but it appears to be the exact same question you are asking here.

Horizontal UITableView




回答2:


See this example

https://github.com/alekseyn/EasyTableView




回答3:


I think you want to display text in detail. The same case with me. I tried 2 options. One to add a UIScroll view and add UITable view inside it. But it doesnot work. Then I use custom cell and add Ui scroll in cell. It works but I think it is against HIG of Apple.

So at last I tried the last option which works for me. I have added line break mode for Cell's text to divide it in 2 or 3 lines to display the full text in cell. here is the sample code in The Cell for Row at Index Path method while creating the cell when it is nill means at the time of creation. Try this , I hope it will help you.

    if (cell == nil) 
    {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
        cell.textLabel.lineBreakMode = UILineBreakModeWordWrap;
        cell.textLabel.numberOfLines =0;
        cell.textLabel.font = [UIFont fontWithName:@"Helvetica" size:15.0];
    }


来源:https://stackoverflow.com/questions/8238304/horizontal-scrolling-of-uitableview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!