2011-09-22 7 views
0

UIViewController의 하위보기로 TTThumbsViewController을 추가하려고하지만 앱이 충돌하는 중입니다. 여기에서 파일 -UIViewController에서 TTThumbsViewController를 구현하고 있습니까?

#import <UIKit/UIKit.h> 
#import <Three20/Three20.h> 
#import <Three20UI/UIViewAdditions.h> 
#import "MockPhotoSource.h" 

@interface photos : UIViewController <NSXMLParserDelegate, TTThumbsViewControllerDelegate> 
{ 
    TTThumbsViewController *photoSource; 
........... 
} 

하는 .m 파일 -

- (void)viewDidLoad { 

// parsing a feed 
[self parseXMLFileAtURL:@"http://feed203.photobucket.com/albums/aa15/vikysaran/Worst%20Parents/feed.rss"]; 

    NSMutableArray *arr = [[NSMutableArray alloc]init];       

    for (int i=0; i < [stories count];i++) { 

     [arr addObject:[[[MockPhoto alloc] initWithURL:[[stories objectAtIndex:i] objectForKey:@"fullimageurl"] smallURL:[[stories objectAtIndex:i] objectForKey:@"thumburl"] 
size:CGSizeMake(960, 1280)] autorelease]]; 
    } 
    photoSource = [[[MockPhotoSource alloc] initWithType:MockPhotoSourceNormal title:nil photos:[NSArray arrayWithArray:arr] photos2:nil]autorelease]; 
// till here the code is working fine if i am not using uiviewcontroller 
     NSLog(@"mockphoto%@", arr); 

     [self.view addSubview:photoSource.view];// adding to uiview 
    } 

여기에 오류가 .H 코드 -

-[MockPhotoSource view]: unrecognized selector sent to instance 0x6924ca0 
2011-09-22 13:07:07.375 JesonTerry[1969:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MockPhotoSource view]: unrecognized selector sent to instance 0x6924ca0' 

하십시오 누구의 도움

을 displays- 참조하십시오. 내가

답변

1

보기 컨트롤러는 유형 TTThumbsViewController 및 샘플 난 그렇게 생각하지 말아

+0

폴더에 있습니다 .. TTCatalog 응용 프로그램을 확인 스타터가 아닌 UIViewControler 수있다 ... 내가 잘못 여기서 완전히 혼란 스러워요, 그것은이다 TTThumbsViewControllerDelegate를 UIViewController에 상속하는 것은 불가능합니까? –

관련 문제