-(UITableViewCell *) TableView: (UITableView *) TableView Cellforrowatindexpath: (Nsindexpath *) IndexPath { static NSString *cellidentifier = @ "Cell"; UITableViewCell *cell = [TableView dequeuereusablecellwithidentifier:cellidentifier]; if (Cell==nil) { cell = [[UITableViewCell alloc]initwithstyle:uitableviewcellstylesubtitle reuseidentifier:cellidentifier]; } Cell.accessorytype = Uitableviewcellaccessorydetaildisclosurebutton; Spentmoney *spentmoney = [Dailycontent objectAtIndex:indexPath.row]; NSDateFormatter *dateformat = [[NSDateFormatter alloc]init]; Dateformat.dateformat = @ "HH:mm:ss"; Cell.textLabel.text = [DateFormat stringFromDate:spentMoney.spentDate]; Cell.detailTextLabel.text = [NSString stringwithformat:@ "$%@", Spentmoney.money]; When a picture is stored in a library, it is nsdata, read it, and just use the imagewithdata to read the picture out. Cell.imageView.image = [UIImage imageWithData:spentMoney.contentImage]; return cell; DateFormat = nil; } |