I'm quite new to Xcode and have a quite amateur question still, it's quite relevant. I come from VB.NET and if I want to print mylabel + mylabel(x10) i'd use the following code:
for(i=0,i<=10,i++) {
mylabel = i;
mylabel &= mylabel;
}
I'd like to do this for xcode as well...
what I currently have will overwrite the string instead of adding it:
for (int i=0; i<=10; i++) {
NSMutableString *lol =
[[NSMutableString alloc]initWithFormat:@" Getal: %i \n",i];
[myLabel setStringValue:lol];
}
%d, not%i. And generally you don't use a\nin label text. And there's no need to create a mutable string if you're not going to alter it. And if myLabel is a UILabel, you set it's text withsetText:.%dand%iare the same when used with string formats.&idoesn't work.