だから、私はObjective-Cの学習を始めたばかりで、この「自己」に出くわしました。私はCしか使ったことがありませんが、Javaでも使われているのではないでしょうか? 誰か説明できますか?次に例を示します。
- (IBAction)digitPressed:(UIButton *)sender
{
NSString *digit = [sender currentTitle];
UILabel *myDisplay = [self display]; //why this?
}
なんでこれだけじゃないの?
- (IBAction)digitPressed:(UIButton *)sender
{
NSString *digit = [sender currentTitle];
UILabel *myDisplay = display; //why not like this?
}
表示は UILabel *