質問

I have a tableview with a custom cell. Then labels that the user inputs data. What would be the best way to make the first cell of the table record the data the user inputed then the next row record new data that is inputed.

So

  1. User inputs data
  2. First cell records data
  3. Insert new cell
  4. User inputs new data
  5. Second row records new data
役に立ちましたか?

解決

To access the cells you can do the following

UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:yourIndexPath];

Then you can get the values of your label using cell.myLabel.text, though I would suggest using a UITextField instead for inputting text

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top