Hola tengo este problema declare esto
IBOutlet UILabel *h1;
IBOutlet UILabel *h2;
IBOutlet UILabel *h3;
IBOutlet UILabel *h4;
y quiero llenar los label con numeros random asi:
for (int i=1; i<=4; i++) {
int numerosr = random()%12;
h[i].text = [[NSString alloc]initWithFormat:@"%2.1f", numerosr];
}
pero marca error en h[1] que no reconoce h
Hi I have this problem declare that
IBOutlet UILabel * h1;
IBOutlet UILabel * h2;
IBOutlet UILabel * h3;
IBOutlet UILabel * h4;
and I want to fill the label with random numbers like this:
for (int i = 1; i <= 4; i + +) {
int numerosr = random ()% 12;
h [i]. text = [[NSString alloc] initWithFormat: @ "% 2.1f", numerosr]
}
but it makes error in h [1] which does not recognize h
(Thanks to http://translate.google.com/)