为什么就有值了呢!!!!!
@interface test : NSObject
-(id) initview;
@property (strong, nonatomic) NSMutableDictionary *_vbx;
@end
#import "test.h"
@implementation test
@synthesize _vbx;
-(id) initview
{
_vbx= [@{} mutableCopy];
[_vbx setObject:[@[] mutableCopy] forKey:@"0"];
[self fillvalue];
}
-(void)fillvalue
{
NSMutableArray *tmp =[_vbx objectForKey:@"0"];
NSMutableArray *items=[NSArray arrayWithObjects:@"uuu", @"yyy",nil];
[tmp addObjectsFromArray:items];
}
@end
很奇怪,initview的时候,_vbx是一个空值,为什么执行了fillvalue,并没有给_vbx赋值,但是_vbx却有值了呢?值是tmp
哪位达人给个详细的解释啊
[解决办法]