를 선언하지,이 컴파일러 오류가 점점 계속 :아이폰 OS는 오류를 컴파일 : 나는 ARC 내 아이폰 OS 프로젝트를 전환 이후 'CDViewController'에 대한 눈에 띄는 @ 인터페이스가 선택
[self.viewController setUseAgof:false];
:이 라인에서
No visible @interface for 'CDViewController' declares the selector 'setUseAgof:'
을 이 파일에서
:
AppDelegate.m
메소드가 확실히 정의되어 있지만3210#import "AppDelegate.h"
#import "MainViewController.h"
#import <Cordova/CDVPlugin.h>
#import "NSString+MD5.h"
@implementation AppDelegate
@synthesize window, viewController;
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
// (...)
[self.viewController setUseAgof:false]; // <-- HERE
// (...)
return YES;
}
@end
:
MainViewController.h
#import <Cordova/CDVViewController.h>
#import <ADTECHMobileSDK/ADTECHMobileSDK.h>
@interface MainViewController : CDVViewController <ATInterstitialViewDelegate>{
ATInterstitialView *interstitial;
}
- (void)setUseAgof:(BOOL)useAgofParam;
@end
@interface MainCommandDelegate : CDVCommandDelegateImpl
@end
@interface MainCommandQueue : CDVCommandQueue
@end
MainViewController.m
#import "MainViewController.h"
@interface MainViewController()
- (void)setUseAgof:(BOOL)useAgofParam;
@end
@implementation MainViewController
BOOL useAgof = true;
- (void)setUseAgof:(BOOL)useAgofParam
{
NSLog(@"1.) Setting useAgof = %d", (int)useAgofParam);
useAgof = useAgofParam;
}
나는 그것을하지 않습니다. 뭐가 문제 야?
업데이트 :
AppDelegate.h
#import <UIKit/UIKit.h>
#import <Cordova/CDVViewController.h>
#import <INFOnlineLibrary/INFOnlineLibrary.h>
@interface AppDelegate : NSObject <UIApplicationDelegate>{}
@property (nonatomic, strong) IBOutlet UIWindow* window;
@property (nonatomic, strong) IBOutlet CDVViewController* viewController;
@end
나에게 잘 보일 것 :'@property (nonatomic, strong) IBOutlet CDVViewController * viewController;' – Timo
'MainViewController'가되어야합니까? OP가'MainViewController' 인터페이스에서 함수를 선언했기 때문에. – Amar
@Timo 선언 된 메서드는 기본 클래스가 아닌 파생 클래스의 일부입니다. 문제가 있습니까? – Amar