我尝试从一个视图传递一个NSString到另一个视图,但我没有工作。我在SecondViewController设置的NSString财产不能通过一个NSString从一个视图到另一个视图
@property (assign) NSString * wert1;
当我加载SecondViewController与上FirstViewController按钮按下,我尝试通过的NSString:
SecondViewController *Second = [[SpinViewController alloc] initWithNibName:nil bundle:nil];
Second.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"black.png"]];
[Second setWert1:texteingabe1]; //HERE <<<<
Second.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:Second animated:YES];
[Second release];
在SecondViewController我做这:
NSLog(@"%@",wert1);
但NSLog只是说:(空)。为什么?
感谢您的帮助,并为我的糟糕英语感到抱歉。
任何洞察它为什么它的作品将是伟大的... – 2010-01-10 23:41:50