Ich erstelle eine Instanz eines ViewControllers und versuche dann, den Text seiner Eigenschaften zu definieren, ein UILabel.Einstellen der Eigenschaften eines ViewControllers nach der Instanziierung
BoyController *boyViewController = [[BoyController alloc] initWithNibName:@"BoyView" bundle:nil];
NSString *newText = [astrology getSignWithMonth:month withDay:day];
boyViewController.sign.text = newText;
NSLog(@" the boyviewcontroller.sign.text is now set to: %@", boyViewController.sign.text);
[newText release];
Ich versuchte dies, aber es hat nicht funktioniert ...
Also versuchte ich folgendes:
BoyController *boyViewController = [[BoyController alloc] initWithNibName:@"BoyView" bundle:nil];
UILabel *newUILabel = [[UILabel alloc] init];
newUILabel.text = [astrology getSignWithMonth:month withDay:day];
boyViewController.sign = newUILabel;
NSLog(@" the boyviewcontroller.sign.text is now set to: %@", newUILabel.text);
[newUILabel release];
Aber ohne Erfolg ..
Ich bin nicht sicher, warum ich nicht die Text-Eigenschaft des UILabel "Zeichen" in BoyViewController setzen kann.