저는 문제가 생겼습니다. 간단합니다. TableView 객체가있는 ViewController (SplitViewController 아님) ViewController가 있습니다. 사용자가 테이블의 행을 클릭하면 오른쪽의 내 레이블이 적절하게 변경되기를 원합니다.didSelectRowAtIndexPath 값을 할당하려면
내 라벨 나는이 코드로의 TableView를 채우는
@property (weak, nonatomic) IBOutlet UILabel *rotuloDetalhesLabel;
을 변경하려면 그 (텍스트와 오른쪽에있는 "놈이 Vinho을"). viewDidLoad 메서드에서 개체를 만들고 "vinhos"라는 NSArray에 넣습니다. 있는 TableView
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
// Configura a Cell
static NSString *CellIdentifier = @"TableCell";
TableCell *cell = (TableCell *)[self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[TableCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
Vinho *vinho = [vinhos objectAtIndex:indexPath.row];
// rotuloLabel is the Label of the row
cell.rotuloLabel.text = vinho.rotulo;
return cell;
}
나는 그것을 didSelectRowAtIndexPath 방법에 이루어집니다하지만 난 잘 모릅니다 추측을 채우기
// Create object
Vinho *vinho1 = [Vinho new];
vinho1.rotulo = @"Adega de Borda Premium";
Vinho *vinho2 = [Vinho new];
vinho2.rotulo = @"Adega de Borda Premium 2";
// Populate the NSArray with the objects that I create before
vinhos = [NSArray arrayWithObjects: vinho1, vinho2, nil];
. 중요한 것을 게시하는 것을 잊어 버리면 말해주십시오.
당신은 당신의'-didSelectRowAtIndexPath' 방법을 게시하시기 바랍니다 수 : 당신이 말한대로 코멘트에 페이드 애니메이션을 wan't 경우
, 어쩌면 이것은 당신이 시작할 수 있을까? – Mischa