我有一個表格視圖。我正在顯示一個數組。當我滾動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