0
即使我在.h中聲明它並在.m中進行合成,我也有使用未聲明的標識符。在我的函數中使用未聲明的標識符
我以前有另一個問題,但我發佈了一個問題在堆棧溢出,他們說我不應該外部他們,當我超過他們的代碼給了我一個錯誤「ld:symbol(s)not found for architecture I386 鐺:錯誤:連接命令,退出代碼1失敗(使用-v看到調用)」,並且知道我沒有和它給我‘使用未聲明的標識符’,你可以看到
.H
#import <UIKit/UIKit.h>
BOOL OFrameIsHidden, XFrameIsHidden;
NSString *topOne, *topTwo, *topThree;
NSString *midOne, *midTwo, *midThree;
NSString *botOne, *botTwo, *botThree;
void hideAll(void);
@interface ViewController : UIViewController
void hideAll(void);
@property (weak, nonatomic) IBOutlet UIImageView *XFrame;
@property (weak, nonatomic) IBOutlet UIImageView *OFrame;
@property (weak, nonatomic) IBOutlet UIImageView *frame;
@property (weak, nonatomic) IBOutlet UILabel *X;
@property (weak, nonatomic) IBOutlet UILabel *O;
@property (weak, nonatomic) IBOutlet UILabel *WhoWon;
@property (weak, nonatomic) IBOutlet UIButton *oneOne;
@property (weak, nonatomic) IBOutlet UIButton *oneTwo;
@property (weak, nonatomic) IBOutlet UIButton *oneThree;
@property (weak, nonatomic) IBOutlet UIButton *twoOne;
@property (weak, nonatomic) IBOutlet UIButton *twoTwo;
@property (weak, nonatomic) IBOutlet UIButton *twoThree;
@property (weak, nonatomic) IBOutlet UIButton *threeOne;
@property (weak, nonatomic) IBOutlet UIButton *threeTwo;
@property (weak, nonatomic) IBOutlet UIButton *threeThree;
@end
.M
#import "ViewController.h"
@interface ViewController()
@end
@implementation ViewController
@synthesize XFrame, OFrame, frame, X, O, WhoWon;
@synthesize oneOne, oneTwo, oneThree;
@synthesize twoOne, twoTwo, twoThree;
@synthesize threeOne, threeTwo, threeThree;
void hideAll(void){
[OFrame setHidden:YES];
[XFrame setHidden:YES];
[frame setHidden:YES];
[X setHidden:YES];
[O setHidden:YES];
[oneOne setHidden:YES];
[oneTwo setHidden:YES];
[oneThree setHidden:YES];
[oneOne setHidden:YES];
[twoTwo setHidden:YES];
[twoThree setHidden:YES];
[threeOne setHidden:YES];
[threeTwo setHidden:YES];
[threeThree setHidden:YES];
}
對於您的信息,還有一些IBAcions的代碼,但我不想讓這麼長。
這是標記爲C++,因爲...? – TemplateRex
因爲很花哨! –
哪個標識符未聲明?什麼是完整的錯誤信息?它發生在哪一行? - 您如何期望在沒有提供任何信息的情況下獲得答案? –