나는 하나의보기를 다른보기로 전달하는 레이블 값을 사용합니다 .i 표보기 및 표보기를 사용하여 레이블을 넣었습니다. 코드 ......아이폰에서 응용 프로그램 대리자 메서드를 사용하는 방법
같은
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *CellIdentifier = [NSString stringWithFormat:@"%i %i",indexPath.row,indexPath.section];
UITableViewCell *cell =[self.tableViewdequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefaultreuseIdentifier:CellIdentifier] autorelease];
cell.accessoryType = UITableViewCellAccessoryNone;
NSMutableArray *arr=[NSMutableArray arrayWithArray:[finalArray objectAtIndex:indexForAll]];
NSLog(@"-=-= arr count %d -=-====",[arr count]);
NSLog(@"%@",[[arr objectAtIndex:indexPath.row]description]);
NSLog(@"-====== row value %d -=======",indexPath.row);
NSLog(@"--=-=--- strike value %@",[[arr objectAtIndex:indexPath.row]valueForKey:@"Strike"]);
//indexForAll=indexPath.row
cell.accessoryType = UITableViewCellAccessoryNone;
cell.highlighted = YES;
NSMutableArray *arr2=[NSMutableArray arrayWithArray:[arr objectAtIndex:indexPath.row]];
NSLog(@" -=-=-=-= Arr2 value : %d ",[arr2 count]);
NSLog(@"%@",[arr2 description]);
//.......................................Strike value.....................................//
UILabel *label1;
label1 =[[UILabel alloc]initWithFrame:CGRectMake(10, 3,50, 15)];
NSLog(@"-=-=--= lable1 value -%@",[[arr2 objectAtIndex:0]valueForKey:@"Strike"]);
[label1 setText:[NSString stringWithFormat:@"%@",
[[arr2 objectAtIndex:0]valueForKey:@"Strike"]]];
label1.textAlignment = UITextAlignmentCenter;
[label1 setFont:[UIFont fontWithName:@"Helvetica" size:12]];
[label1 setTextColor:[UIColor blackColor]];
[cell.contentView addSubview:label1];
NSLog(@"lable1 addded");
[self.tableView reloadData];
으로 난 값을 가져 LABEL1 싶어 한 내가 시도 감사
을 다른 view.i는 TRID했지만 어떤 .if도없는 성공은 도움 such
AppDelegate_iPhone *appDelegate = (AppDelegate_iPhone *)[[UIApplication sharedApplication] delegate];
그러나 값은 통과하지 못합니다.
4 개의 공백을 사용하여 코드를 들여 쓰면 읽을 수 없습니다. – Vojto
잘 구조화 된 코드는 질문을 더 잘 이해하는 데 도움이 될 수 있습니다. – AlexVogel
질문을 기술하는 방식이 적절하지 않습니다. 개선하십시오. – Ishu