Having problems with adding objects to NSMutableArray

后端 未结 3 1859
予麋鹿
予麋鹿 2021-01-27 12:03

I am having problem with adding objects to NSMutableArray *array.

//  Controller.m
#import \"Controller.h\"
@implementation Controller
- (void)parser:(NSString          


        
3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-27 12:28

    Here is the method I added to Controller class:

    - (id)init {
        self = [super init];
        if(self){
            array = [[NSMutableArray alloc] init];
        }
        return self;
    }
    - (void)dealloc {
        [array release];
        [super dealloc];
    }
    

提交回复
热议问题