English 中文(简体)
页: 1 比较阿雷拉和塞梯
原标题:iOS Compare Arrays and Sets

I m试图比较两个阵列,看它们是否匹配 我的测试案例是“Winners”,我一直在试图比较这些病例,以便吸入Array和Array与无uck。 即便我知道,例如,Array和Alon1两人均有相同的物体,但似乎不匹配,触发我的NSLOG(S)

这就是获胜者阵列的建立方式。

NSArray  *win = [NSArray arrayWithObjects:@"0",@"1",@"2",nil];
winners = [NSArray arrayWithObjects: win1,win2,win3,win4,win5,win6,win7,win8,nil];

B. 个人和参与者如何

-(void)checkSpace:(NSString *)playerName spot:(int)selectedSpot
{
    NSString *p = playerName;
    int s = selectedSpot;
    NSNumber* gameSpace = [NSNumber numberWithInt:s];

    if (p == comp)
    {    
        [halArray addObject:gameSpace];        
        [self checkWin];
    }
}
最佳回答

问题是,你把双赢阵列填入<条码>。 注

www.un.org/spanish/ecosoc 他们永远不会相匹配。

改变这种(和另一赢利):

NSArray  *win1 = [NSArray arrayWithObjects:@"0",@"1",@"2",nil];

为此:

NSArray  *win1 = [NSArray arrayWithObjects:[NSNumber numberWithInt:0],
                                           [NSNumber numberWithInt:1],
                                           [NSNumber numberWithInt:2],
                                           nil];

<>>>>

http://www.un.org/Depts/DGACM/index_chinese.htm

问题回答

暂无回答




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签