开发者

iphone screen - type of view to use

开发者 https://www.devze.com 2022-12-30 16:41 出处:网络
looking for some advice on what type of view can be used to build a screen with the following elements:

looking for some advice on what type of view can be used to build a screen with the following elements:

2 labels followed by 2 buttons. Then a small table view with 3 rows.

Should a UIView be used or a UITableView? I've attempted using a UITableView - however I couldn't add the labels or buttons.

So I've now built the view using a UIView. I added the labels and buttons and then a UITableV开发者_运维百科iew from the library. However I have no idea how to populate the rows in the table?

Any ideas?

Regards, Fiona


You could always create the view that you want and return it in the table view delegate's -tableView:viewForHeaderInSection: method. That would give you your table view rows that you want plus your custom view above it.


You need to learn how to use the UITableView before going any further. Time taken now will pay off later on.

There are plenty of tutorials about the UITableView, but I found the best learning I had was from the free iTunes U Standford iPhone course. You don't need to watch it all, but at the very least you should watch the episode on UITableView, as it'll cover everything you need to know. I strongly recommend watching it all, especially the first 8 or so lectures, as it covers the basics of what you need to know really, really effectively.

0

精彩评论

暂无评论...
验证码 换一张
取 消