我有一个表格视图。我正在显示一个数组。当我滚动tableview它不移动到最后一个表格单元格的底部。我该怎么做。底部滚动不能在表格视图
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return tableResourceArray.count;}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
NSString *cellIdentifier=[NSString stringWithFormat:@"CustomCell:%d",indexPath.row];
customcell *cell = (customcell *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
cell = [[customcell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
}
if(tableView==table) {
table.backgroundColor = [UIColor clearColor];
table.separatorColor=[UIColor clearColor];
NSDictionary *slug = [category objectAtIndex:indexPath.row];
NSLog(@"gggg:%@",slug);
cell.ctitle.text = [NSString stringWithFormat:@"%@", [slug objectForKey:@"title"]];
cell.ctitle.font=[UIFont fontWithName:@"Arial" size:12];
cell.cdate.text = [NSString stringWithFormat:@"Date:%@", [slug objectForKey:@"date"]];
cell.cdate.textColor=[UIColor colorWithRed:0.820 green:0.776 blue:0.526 alpha:1.000];
cell.ccontent.text = [NSString stringWithFormat:@"%@", [slug objectForKey:@"content"]];
}
什么是tablview框架?表格代码的父代也是如此。 – ajay
table.frame = CGRectMake(0,130,320,480);这是我的表格视图框架 – gowtham
你使用的是UINavigationCongroller吗? – ajay