Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- static NSString *CellIdentifier = @"Cell";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
- }
- // Configure the cell.
- CGRect contentRect = CGRectMake(8.0, 50.0, 280, 150);
- UILabel *textView = [[UILabel alloc] initWithFrame:contentRect];
- textView.text = @"Type whatever you want to here. It will appear right below the last cell.";
- textView.numberOfLines = 6;
- textView.textAlignment = UITextAlignmentCenter;
- textView.textColor = [UIColor grayColor];
- textView.backgroundColor = [UIColor clearColor];
- textView.font = [UIFont systemFontOfSize:16];
- [cell.contentView addSubview:textView];
- [textView release];
- [[cell textLabel] setText:@"Type in the cell text here. Can be as long as you want and it will be centered."];
- [[cell textLabel] setNumberOfLines:2];
- [[cell textLabel] setTextAlignment:UITextAlignmentCenter];
- // If you want a photo below the last cell put it here.
- UIImageView *img = [[UIImageView alloc]initWithFrame:CGRectMake(95, 185, 130, 195)];
- [img setImage:[UIImage imageNamed:@"Photo.png"]];
- [cell addSubview:img];
- [img release];
- cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
- return cell;
- }
Add Comment
Please, Sign In to add comment