阅读背景:

如何检查2个数组是否具有相同的元素,如果有,则从其中一个数组中删除该元素?

来源:互联网 

I currently have 2 arrays, one called rewardsArray and one called expiredRewardsArray. The rewardsArray I'm getting from an api thats fetched every time I connect. The expiredRewardsArray I save locally. What I'm trying to do is in the viewDidLoad, after I retrieve the rewardsArray data I want to compare it to the expiredRewardsArray's data. If there is a match I want to remove the item from the rewardsArray. This is what I have so far but it never goes inside the "if let" brackets so it's not removing the item from the rewardsArray:I currently have 2 arrays, one called rewardsAr




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: