我的 AppDelegate.h 中的属性:@property (retain, nonatomic) NSString *bmiShared;。
(它是在我的..中合成的AppDelegate.m。)
我已经AppDelegate.h导入了两个 View Controller 头文件。我也有AppDelegate *appDelegate每个标题。
在两个实现文件(ViewController.m和TipsViewController.m)中,我都有:
appDelegate.bmiShared = bmiView.text;
appDelegate = [[UIApplication sharedApplication] delegate];
我不知道在传递数据时我做错了什么。我希望floatValueofbmiView.text可以在 my 中使用,TipsViewController这样如果floatValueofbmiView.text是一定数量,它将在 my 中显示正确的信息TipsViewController view。如果这有什么不同,我正在使用故事板。