[問題] ios計次器顯示不出來
我寫了一按鈕 每按一次
label 就會加一
但是我寫在 .m
code 如下
@implementation RTViewController
@synthesize rr, displaytime;
int rrtime; // declare count number <--變數宣告在這裡
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
int rrtime;
- (IBAction)startpause:(UIButton *)sender{;
}
- (IBAction)rrcouner:(UIButton *)sender{
rrtime++; // while push the bottom rrtime plus 1 <--按下以後加一
rr.text=@"%d",rrtime; //display the value <--輸出
}
- (IBAction)enterdata:(UIButton *)sender{;}
}
下面省略
但是我用模擬器跑出來
他一直都是顯示 "%d"
沒有run-time error 但是跳出 expression result unused的警告訊息
請問我該怎們辦T_T
小弟初學者
只有基礎C++的知識
謝謝解答
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 23.17.129.33
→
12/28 13:07, , 1F
12/28 13:07, 1F
→
12/28 13:31, , 2F
12/28 13:31, 2F
→
12/28 16:03, , 3F
12/28 16:03, 3F
→
12/29 20:34, , 4F
12/29 20:34, 4F
MacDev 近期熱門文章
PTT數位生活區 即時熱門文章