1
我在我的視圖控制器的接口中聲明瞭一個SetBallVisibility方法。在執行中看不到void程序
但是,當我嘗試在實現中使用它時,出現未聲明的標識符錯誤。我做錯了什麼?
接口
@interface TimeFrameController : UIViewController {
IBOutlet UILabel *lblTime;
IBOutlet UIButton *btnTimeoutOrRunning;
IBOutlet UILabel *lblMessage;
IBOutlet UIButton *btnNextVisit;
IBOutlet UIImage *picRed;
IBOutlet UIImage *picYellow;
IBOutlet UIButton *btnRed;
IBOutlet UIButton *btnYellow;
IBOutlet UIButton *btnChangePlayer;
IBOutlet UIButton *btnFrameOver;
NSString *Player1Name;
NSString *ActivePlayer;
NSString *Player2Name;
NSString *Player1Col;
NSString *Player2Col;
NSString *ActivePlayerCol;
NSTimer *StopClock;
int *StopClockOffset;
int *StopClockPos;
int *Player1Visits;
int *Player2Visits;
}
@property (nonatomic, retain) IBOutlet UILabel *lblTime;
@property (nonatomic, retain) IBOutlet UILabel *lblMessage;
@property (nonatomic, retain) IBOutlet UIButton *btnTimeoutOrRunning;
@property (nonatomic, retain) IBOutlet UIImage *picRed;
@property (nonatomic, retain) IBOutlet UIImage *picYellow;
@property (nonatomic, retain) IBOutlet UIButton *btnYellow;
@property (nonatomic, retain) IBOutlet UIButton *btnRed;
@property (nonatomic, retain) IBOutlet UIButton *btnChangePlayer;
@property (nonatomic, copy) NSString *Player1Name;
@property (nonatomic, copy) NSString *Player2Name;
@property (nonatomic, copy) NSString *Player1Col;
@property (nonatomic, copy) NSString *Player2Col;
@property (nonatomic, copy) NSString *ActivePlayer;
@property (nonatomic, retain) IBOutlet UIButton *btnNextVisit;
@property (nonatomic, retain) IBOutlet UIButton *btnFrameOver;
//@property (nonatomic, retain) NSTimer *StopClock;
bool *ColoursPicked;
//NSString *ActivePlayer;
NSString *ActivePlayerCol;
- (void)SetBallVisibility;
- (IBAction)NextVisitPressed:(id)sender;
- (IBAction)TimeOutOrRunningPressed:(id)sender;
-(void)StartStopClock:(int)nOffSet;
- (IBAction)ChangePlayer:(id)sender;
- (IBAction)YellowPressed:(id)sender;
- (IBAction)RedPressed:(id)sender;
@end
Implementation
#import "TimeFrameController.h"
@implementation TimeFrameController
@synthesize lblTime;
//@synthesize StopClock;
@synthesize btnTimeoutOrRunning;
@synthesize picRed;
@synthesize picYellow;
@synthesize lblMessage;
@synthesize Player1Name;
@synthesize ActivePlayer;
@synthesize Player2Name;
@synthesize btnRed;
@synthesize btnYellow;
@synthesize Player1Col;
@synthesize Player2Col;
@synthesize btnNextVisit;
@synthesize btnChangePlayer;
@synthesize btnFrameOver;
- (void)updateCounter:(NSTimer *)theTimer {
}
-(void) StartStopClock:(int)nOffSet{
.....
}
- (IBAction)NextVisitPressed:(id)sender{
....
[SetBallVisibility];
.....
}
- (void)SetBallVisibility{
if ((Player1Visits > 1) && (Player2Visits > 1))
{
}
}
乾杯
保羅
如果有人可以編輯它只留下與問題相關的部分,它將有助於易讀性。我不能 - 我的信譽太低了:) – 2010-01-11 08:20:36