Luc
Luc

Reputation: 17082

UITextField and UILabel in UIScrollVew

In my iphone app, I need to create a controller for which the view would have the following specs.

(This is pretty much what is done in the Wunderlist iphone app).

To do so, I was thinking of using a UIScrollView instead of the UIView of the controller and add the UITextField and all the UILabel with the [self addSubView:label_i]

Is this approach correct ? At the beginning I tried the UITableView approach but I am not very satisfied with that.

Upvotes: 0

Views: 193

Answers (1)

Roy
Roy

Reputation: 3634

Looking at this Wunderlist app, this can be implemented using a UITableView with a subclassed, custom UITableViewCell (with transparent margins of [UIColor clearColor]).

Here are some helpful links: "Creating a Custom UITableViewCell In iOS 4" "Custom UITableViewCell Using IB"

If you want to work with a list of "UILabels," a UITableView will be the best bet by far.

EDIT: The UITextView at the top of the view corresponds to the tableHeaderView property.

Upvotes: 1

Related Questions