- (void)viewDidLoad {
[super viewDidLoad];
array1 =[[NSMutableArray alloc]initWithObjects:@"Sources of Stress",@"Stress Symptoms",@"Stress Resilience",nil];
array2 =[[NSMutableArray alloc]initWithObjects:@"Mood",@"Notes",nil];
}
//In side the cellfor row at indexpath
f(indexPath.section==0)
{
//cell.textLabel.textAlignment=UITextAlignmentCenter;
cell.textLabel.text=[array1 objectAtIndex:indexPath.row];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
else
{
//cell.textLabel.textAlignment=UITextAlignmentCenter;
cell.textLabel.text=[array2 objectAtIndex:indexPath.row];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
return cell;
[super viewDidLoad];
array1 =[[NSMutableArray alloc]initWithObjects:@"Sources of Stress",@"Stress Symptoms",@"Stress Resilience",nil];
array2 =[[NSMutableArray alloc]initWithObjects:@"Mood",@"Notes",nil];
}
//In side the cellfor row at indexpath
f(indexPath.section==0)
{
//cell.textLabel.textAlignment=UITextAlignmentCenter;
cell.textLabel.text=[array1 objectAtIndex:indexPath.row];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
else
{
//cell.textLabel.textAlignment=UITextAlignmentCenter;
cell.textLabel.text=[array2 objectAtIndex:indexPath.row];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
return cell;
No comments:
Post a Comment