2012-10-29 3 views
3

매우 일반적인 문제인 것 같지만 내 코드가 무엇이 잘못되었는지 알아낼 수 없습니다.xcode 오류 : 표시되지 않는 masterViewController의 @interface가 셀렉터를 선언합니다.

나는 stackoverflow를 샅샅이 조사하고 내 것과 비슷한 게시물을 적어도 12 개 이상 읽었지 만 개인적인 문제는 파악할 수 없습니다.

기본적으로 모달보기에서 NSMutableDictionary를 마스터보기로 전달하려고합니다.

QuoteMasterViewController.h :

@class QuoteModalViewController; 
    @interface QuoteMasterViewController : UITableViewController 
    @end 

QuoteMasterViewController.m :

#import "QuoteMasterViewController.h" 
#import "QuoteModalViewController.h" 
#import "QuoteDetailViewController.h" 

@interface QuoteMasterViewController() { 
    NSMutableArray *_objects; 
    } 
@end 

@implementation QuoteMasterViewController 

//after the ViewDidLoad method... 

-(void)addQuotationWithDictionary: (NSMutableDictionary *)myDictionary { 

    [self insertNewObject:myDictionary]; 
    [self dismissModalViewControllerAnimated:YES]; 
} 

QuoteModalViewController.h :

#import <UIKit/UIKit.h> 

@class QuoteMasterViewController; 

@interface QuoteModalViewController : UIViewController <UITextFieldDelegate> 

@property (nonatomic, weak) QuoteMasterViewController *masterView; 
@property (strong, nonatomic) IBOutlet UITextField *sourceQuoted; 
@property (strong, nonatomic) IBOutlet UITextField *quoteQuoted; 
- (IBAction)saveButtonPressed:(id)sender; 
- (IBAction)cancelButtonPressed:(id)sender; 

@end 

QuoteModalViewController.m :

여기에 코드입니다

모든 도움을 주셔서 감사합니다.

답변

7

헤더 파일에 메서드를 선언하지 않았습니다. @interface QuoteMasterViewController@end 사이 QuoteMasterViewController.h 파일에

-(void)addQuotationWithDictionary: (NSMutableDictionary *)myDictionary; 

를 추가합니다.

+2

정말 고마워요, 제가 정확히 필요한 것이 었습니다. 이봐, 나는이 공동체를 좋아한다. –

관련 문제