I create a table view cell subclass and set it as the class of the prototype.I want to add the outlets to that class and connect them.
But xcode do not respond.
And i try to add the outlets of button in the next time,it works.
I want to display a picture,it is pity that i don't have enough reputations.
I don't understand why this happen.Can somebody help me,Plesae!!
On the method (void)viewDidLoad of your UITableViewController, set:
[self.tableView registerNib:[UINib nibWithNibName:nameOfXibFile bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:identifierOfCell];
On the method (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath, set:
YourClassTableViewCell *cell = [tableView dequeueReusableCellWithReuseIdentifier:identifierOfCell forIndexPath:indexPath];
and set the values for the labels cell.label.text = @"Your text".
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With