Reputation: 3026
I'm getting an error stating could not find an overload for '-' that accepts the supplied arguments
here is my code :
var lastContentOffset = scrollView.contentOffset.y
if -lastContentOffset > 64 { // *could not find an overload for '-' that accepts the supplied arguments*
//do something
}
what am i doing wrong?
Upvotes: 0
Views: 81
Reputation: 3818
Change it to this:
var lastContentOffset = scrollView.contentOffset.y
if (lastContentOffset * -1) > 64 {
//do something
}
Upvotes: 1