相关疑难解决方法(0)

初学者:为什么我会获得EXC BAD ACCESS?

我在点击"self.myData = ..."这一行时遇到异常

GDB程序收到信号:EXC_BAD_ACCESS

这是我的代码:

- (void)viewDidLoad {
    [super viewDidLoad];    
    self.myData = [NSArray arrayWithObjects:
                   [NSArray arrayWithObjects: 
                    @"Boroughs", 
                    [NSArray arrayWithObjects: 
                     @"Kings", 
                     @"Bronx", 
                     @"Manhattan", 
                     @"Queens", 
                     @"Staten Island", 
                     nil], 
                    nil],
                   [NSArray arrayWithObjects: 
                    @"Surrounding Counties", 
                    [NSArray arrayWithObjects: 
                     @"Westchester", 
                     @"Nassau", 
                     @"Suffolk", 
                     "@Fairfield", 
                     nil], 
                    nil],
                   nil];
}
Run Code Online (Sandbox Code Playgroud)

iphone nsarray

1
推荐指数
1
解决办法
754
查看次数

标签 统计

iphone ×1

nsarray ×1