Why does the following result in a BAD_ACCESS error?
NSDictionary *header=[[NSDictionary alloc]initWithObjectsAndKeys:@"fred",@"title",1,@"count", nil];
Can you have different types of objects as values in NSDictionary, including another NSDictionary?
You can put any type of object into an
NSDictionary. So while@"fred"is OK,1is not, as an integer is not an object. If you want to put a number in a dictionary, wrap it in anNSNumber: