阅读背景:

初始化一个类。你能看到这个问题吗?

来源:互联网 
-(id)init {

    if (self = [super init]) {

        self.name = [[NSString alloc] init];
        self.type = [[NSString alloc] init];
        self.phoneNumber = [[NSString alloc]init];
        self.webAddress = [[NSString alloc] init];

        NSMutableArray *pricesArray = [[NSMutableArray alloc] init];
        NSMutableArray *poolsArray = [[NSMutableArray alloc] init];
        self.prices = pricesArray;
        self.pools = poolsArray;

        [pricesArray release];
        [poolsArray release];

        //Create the address dictionaries
        NSMutableDictionary *addressItems = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"", KAddressStreet1Key, @"", KAddressStreet2Key, @"", KAddressBoroughKey, @"", KAddressCityKey, @"", KAddressCountyKey, @"", KAddressPostCodeKey, @"" ,KAddressCountryKey, nil];

        //Add dictionary to the array to contain address values
        self.address = addressItems;
        [addressItems release];

    }

    return self;
}
-(id)init {

    if (self = [super init]) {

  



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: