我想在视图之间发送数据,但出现错误:无法识别的选择器...。
并且在调试器中,变量mystring是 NSCFNumber(“此时”)而不是 NSString ...
allergy_appAppDelegate.h
#import <UIKit/UIKit.h>
@interface allergy_appAppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate> {
UIWindow *window;
UITabBarController *tabBarController;
NSMutableArray *result_array;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
@property (copy , readwrite) NSMutableArray *result_array;
@end
视图控制器.m
allergy_appAppDelegate *dataCenter = (allergy_appAppDelegate *)[[UIApplication sharedApplication]delegate];
dataCenter.result_array = [[NSMutableArray alloc] initWithArray:Parser_result];
结果.m
allergy_appAppDelegate *dataCenter = (allergy_appAppDelegate*)[[UIApplication sharedApplication]delegate];
show_user_array = [[NSMutableArray alloc] initWithArray: dataCenter.result_array]
for (NSString *mystring in show_user_array) {
textView.text = [[textView text] stringByAppendingString:@"\n"];
textView.text = [[textView text] stringByAppendingString:mystring];
}