今天寫了這個:
CGRectContainsPoint(rect, anotherRect.origin)
Xcode 8 告訴我,
這個方式被調整成這個寫法:
rect.contains(anotherRect.origin)
除了移除 C style 的全域方法呼叫方式,使用時的語意相較起來比較合理清楚,也更加物件導向。
More than 5 years have passed since last update.
今天寫了這個:
CGRectContainsPoint(rect, anotherRect.origin)
Xcode 8 告訴我,
這個方式被調整成這個寫法:
rect.contains(anotherRect.origin)
除了移除 C style 的全域方法呼叫方式,使用時的語意相較起來比較合理清楚,也更加物件導向。
Register as a new user and use Qiita more conveniently