先转成OC的数组,OC数组提供indexOfObject(object),let tempItems =self.items! as NSArray objectIndex = tempItems.indexOfObject(object)