2012-06-22 2 views
0

세 개의 섹션으로 된 그룹화 된 스타일의 테이블보기가 있습니다. 사전 배열에서 정보를 가져옵니다.정보를 세 번째 UIView로 푸시 계속

내 앱은 UITable (마스터) 및 UIView (루트)에서 잘 작동합니다. 하지만 UIView (루트)에 직접 연결된 세 번째 UIView로 선택한 셀에서 정보를 계속 밀어 내고 싶습니다.

-UIView (루트)가 :

이 에게
.h  
@property (strong, nonatomic) id detailItem; 



.m 
#import "DetailViewController.h" 

@interface DetailViewController() 
- (void)configureView; 
@end 

@implementation DetailViewController 

@synthesize detailItem = _detailItem; 
@synthesize courseDetailLabel = _courseDetailLabel; 


#pragma mark - Managing the detail item 

- (void)setDetailItem:(id)newDetailItem 
{ 
    if (_detailItem != newDetailItem) { 
     _detailItem = newDetailItem; 

     // Update the view. 
     [self configureView]; 
    } 
} 

- (void)configureView 
{ 
    // Update the user interface for the detail item. 

    if (self.detailItem) { 

     self.courseDetailLabel.text = [[self.detailItem valueForKey:@"courseDetails"] description]; 
    } 
} 
당신은 당신의 디자인을 재고해야

답변

1

- 데이터 채우기 위해 필요한 경우 귀하의 의견/테이블/세포/등 응용 프로그램을 통해 많은 스크린을 통해 필요합니다, 당신은 만들어야합니다 이 데이터를 관리하고이를 필요로하는 모든보기 컨트롤러에서 액세스 할 수있는 싱글 톤 클래스입니다. 이렇게하면 뷰간에 "푸시 (push)"하는 데 필요한 모든 것이 컨트롤러가 필요한 데이터를 가리키는 인덱스입니다.

+0

감사합니다.하지만 여기서는 세 번째 UIView에서 courseDetailLabel.text 만 다시 사용하고 싶습니다. –