Я использую следующий код в табличном представлении для отображения последней строки. Но здесь проблема в том, что при использовании этого я не могу прокрутить таблицу.Я ищу много для этого, но я не нашел способ решить этот вопрос.Может кто-нибудь дать какое-нибудь предложение, как решить эту проблему.
- (UITableViewCell *)tableView:(UITableView *)tableView1 cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MyIdentifier = @"MyIdentifier";
// here to draw cell ImageCell is used for customise cell.
ImageCell *cell = (ImageCell *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier]; // changed this
if (cell == nil) {
cell = [[[ImageCell alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier] autorelease]; // changed this
}
cell.selectionStyle=UITableViewCellSelectionStyleNone;
// setting the text
NSDictionary *messageData = [messageArray objectAtIndex:[indexPath row]];
[cell setData:messageData];
int lastRowNumber = [tableView numberOfRowsInSection:0]-1;
NSIndexPath* ip = [NSIndexPath indexPathForRow:lastRowNumber inSection:0];
[tableView scrollToRowAtIndexPath:ip atScrollPosition:UITableViewScrollPositionNone animated:YES];
// Set up the cell
return cell;
}
Это мой код.