问题
My app was working fine and now suddenly Xcode is giving me this error:
use unresolved identifier cardWasRemoved
func addNewCards() {
countOfCards = countOfCards-1
if(countOfCards >= 0){
self.arrayAuthorization.remove(at: dm.objectIndexToRemove)
cardWasRemoved(removeIndex: dm.objectIndexToRemove)
}
}
And my method implementation is this:
open func cardWasRemoved(removeIndex:Int) {
if layout.newCardShouldAppearOnTheBottom {
layout.cardDidRemoved(removeIndex)
} else {
layout.cardDidRemoved(removeIndex)
}
}
回答1:
It might be that there are some artifacts for the Debug build configuration (when you try running on a Simulator), and you don't have these artifacts for the Release configuration. Try removing your DerivedData directory: How to delete derived data in Xcode 8?
来源:https://stackoverflow.com/questions/45771696/use-unresolved-identifier