views:

38

answers:

3

i need to develop table view for entering text data and boolean values, so i need to implement checkbox functionality for some tableview cells, i know how to implement regular tabledatasource interface for supply the data^ what about different types of cells? Thanks, alot.

A: 

Have you tried implementing your own UITableViewCell? You could also "manually" create one in the data source delegate but this sounds like something that could be re-usable.

Stephen Darlington
if i implement my own cell, then i can depends on something choose one of TextFieldCell or ButtonCell and show it to user? Is it right?
Yola
A: 

There is no big difference between data types. If you are confused with C types (int, bool etc.) keep in mind that you can always wrap them with NSNumber and pass as id where needed. If the question is in cell class itself - NSButtonCell with checkbox cell is the choice. It's available in the Interface Builder.

However, I'd recommend you to use NSArrayController and bindings if it is suitable in your task. Binding is simpler way to fill the table with data and there is no need to convert c <-> obj-c data manually.

Gobra
mm, i mean that some data must be in text format and some in boolean, so i need 2 types of cells too represent it in tableview, and i dont know how to implement table view with too types of cells.
Yola
Gobra
i need two column in table left - captionright - value (text/boolean)so i cant use one cell for whole column
Yola
A: 

i think that what i need - tableView:dataCellForTableColumn:row:

thanks to all

Yola