Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
- static NSString *myID = @"customCell";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:myID];
- if(cell == NULL) {
- [[NSBundle mainBundle] loadNibNamed:@"CustomCellView" owner:self options:nil];
- cell = customCell;
- self.customCell = nil;
- }
- Post *p = [posts objectAtIndex:indexPath.row];
- UILabel *label = (UILabel*)[cell viewWithTag:15];
- label.text = p.Name;
- label = (UILabel*)[cell viewWithTag:10];
- label.text = p.Text;
- [label sizeToFit];
- label = (UILabel*)[cell viewWithTag:20];
- label.text = [p Source];
- //[cell layoutSubviews];
- return cell;
- }
- [label setFrame:CGRectMake(0.0f, 0.0f, 100.0f, 50.0f)];
- [label sizeToFit];
Add Comment
Please, Sign In to add comment