[問題] 新增一個obj class使用 new file的問題
因為最近這一兩天才開始學,跟著stanford 的課程有個小問題
自創class file 包含 m 跟 h如下
======================CalculatorDebugger.m===========
@implementation "CalculatorDebuger.h"
-(void) PrintLog
{
NSLog(@"not show");
}
@end
======================CalculatorBrain.h==============
#import <Foundation/Foundation.h>
@interface CalculatorDebuger : NSObject
-(void) PrintLog;
@end
===============以下是呼叫的片段======================
#import "CalculatorDebuger.h"
@property (nonatomic,strong) CalculatorDebuger *debugger;
@synthesize debugger = _debugger;
- (IBAction)ClearButtonPressed:(UIButton *)sender//按下某按鈕後
{
NSLog(@"show")
[self.debugger PrintLog];
}
問題就是:沒有印 not show 只有印出 show 不知道是哪個步驟出錯呢?
謝謝各位前輩
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 27.100.106.137
推
10/03 12:55, , 1F
10/03 12:55, 1F
→
10/03 12:56, , 2F
10/03 12:56, 2F
→
10/03 13:35, , 3F
10/03 13:35, 3F