我嘗試從一個視圖傳遞一個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