How do you display a spreadsheet-like table in an iPhone view?

余生长醉 提交于 2019-12-24 12:43:21

问题


I need to display a spreadsheet in a view. There's no need to edit the cells of the spreadsheet, and the spreadsheet will consistently have the same number of rows and columns. (The spreadsheet cells will be populated with financial figures generated by the user in a different view)

How would I do this? A UITableView seems inadequate, as there need to be around 70-80 cells displayed in this table.


回答1:


One way to do it is to write your own table cell to contain all the columns in a particular row. Then you can load the cell for each row in UITableView




回答2:


If the cells don't need to be editable, they don't contain images, and the number of cells isn't large, you could just use labels or drawn text inside a grid of framed rectangles in a UIView, and display that larger view inside a UIScrollView.



来源:https://stackoverflow.com/questions/3714349/how-do-you-display-a-spreadsheet-like-table-in-an-iphone-view

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