This problem taking more time. i am just adding set of array values to table view array contains totally 12 values but it is just showing 3 values. if i am change row height more it is just displaying 3 values. if i reduce row height it showing all values so any one can help me how i can show all array value but my row height should be more than 100.
重要的因素是,如果我在 cell.textlabel 中打印数组,它会打印所有值,但我想在动态 uilabel 中打印数组值,那么我该怎么做呢?
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [name count];
}
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellidentifier=@"ViewProfileCell";
UILabel *lab;
ViewProfileCell *cell=(ViewProfileCell*)[tableView dequeueReusableCellWithIdentifier:cellidentifier];
if(!cell)
{
NSArray *nibofviewProfile=[[NSBundle mainBundle]loadNibNamed:@"ViewProfileCell" owner:self options:Nil];
cell=[nibofviewProfile objectAtIndex:0];
lab =[[UILabel alloc]init];
lab.frame=CGRectMake(80, 10, 30, 50);
[cell.contentView addSubview:lab];
}
lab.text=[name objectAtIndex:indexPath.row];
return cell;
}
这是我的代码,如果有人可以为此提供解决方案,我将非常高兴