你好我有这个阵列是比较两个阵列,看它是否与的NSLog数组排序错误原因不明
NSLog (@"1");
favoritesArray = [[NSMutableArray alloc] init];
NSLog (@"2");
//Add items
// favoritesArray = [[NSMutableArray alloc]init];
didContain = [[NSMutableArray alloc]init];
NSLog (@"3");
if ([favoritesArray containsObject:@"one"])
{
[didContain addObject:@"one"];
NSLog (@"4");
}
的第四日志没有按出现测试之后包含一个对象然而。 这是否意味着我的实现是错误的,如果它包含一个对象或者它意味着没有像这样的文件?
编辑 这里是我添加一个数组
-(IBAction) addToFavorites {
favoritesArray = [[NSMutableArray alloc] init];
[favoritesArray addObject:@"one"];
NSLog (@"hello");
怎么来的,这并不显示为对象@"one"
没有什么在这段代码有什么关系的文件。 – 2010-08-19 09:09:05
我编辑的问题 – 2010-08-19 09:18:29