Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (tableView.tag == 802) {
- if (indexPath.row == 0) {
- //MyAccCollectionCell
- if (IS_IPAD) {
- MyAccCollectioniPadCell *cell;
- NSArray *nibPath = [[NSBundle mainBundle] loadNibNamed:@"MyAccCollectioniPadCell" owner:self options:nil];
- cell = [nibPath objectAtIndex:0];
- cell.myAccBalanceListHeader.text = @" COLLECTION OUTSTANDING";
- //[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
- [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
- return cell;
- }else{
- MyAccCollectionCell *cell;
- NSArray *nibPath = [[NSBundle mainBundle] loadNibNamed:@"MyAccCollectionCell" owner:self options:nil];
- cell = [nibPath objectAtIndex:0];
- cell.myAccBalanceListHeader.text = @" COLLECTION OUTSTANDING";
- //[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
- [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
- return cell;
- }
- }else{
- MyAccTableItemsCell *cell = (MyAccTableItemsCell *)[tableView dequeueReusableCellWithIdentifier:@"cell"];
- NSArray *nibPath = [[NSBundle mainBundle] loadNibNamed:@"MyAccTableItemsCell" owner:self options:nil];
- cell = [nibPath objectAtIndex:0];
- [cell.myBidsProductImage setImageWithURL:[[itemsToCollect objectAtIndex:indexPath.row - 1] valueForKey:@"aucThumbnailUrl"]];
- cell.myBidsProductTitle.text =[[itemsToCollect objectAtIndex:indexPath.row - 1] valueForKey:@"aucTitle"];
- cell.myBidsProductPrice.text = [NSString stringWithFormat:@"$%.02f",[[[itemsToCollect objectAtIndex:indexPath.row - 1] valueForKey:@"aucCurrentBid"] floatValue]];
- @try {
- NSString *strDate = [[itemsToCollect objectAtIndex:indexPath.row - 1] valueForKey:@"aucClose"];
- strDate = [strDate stringByReplacingOccurrencesOfString:@"T" withString:@" "];
- NSDateFormatter *oldFormat = [[NSDateFormatter alloc] init];
- // live format "2014-12-31T20:15:00"
- [oldFormat setDateFormat:@"yyyy-MM-dd kk:mm:ss"];
- NSDate *date = [oldFormat dateFromString:strDate];
- //dd/MM/yyyy h:mm:ss a == 31/12/2014 20:15:00 a
- NSDateFormatter *newFormat = [[NSDateFormatter alloc] init];
- [newFormat setDateFormat:@"dd/MM/yyyy h:mm:ss a"];
- NSString *newDate = [newFormat stringFromDate:date];
- NSLog(@"New Date - %@", newDate);
- cell.myBidsProductDate.text = newDate;
- }
- @catch (NSException * e) {
- NSLog(@"Exception: %@", e);
- }
- [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
- return cell;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment