@available(iOS, deprecated:6.0)
func myFunc() {
// calling this function is deprecated on iOS6+
}
Or
@available(iOS, deprecated: 6.0, obsoleted: 7.0, message: "Because !")
func myFunc() {
// deprecated from iOS6, and obsoleted after iOS7, the message "Because !" is displayed in XCode warnings
}
@available(*, deprecated, message: "Parse your data by hand instead")
func parseData() { }
@available(*, deprecated, renamed: "loadData")
func fetchData() { }
@available(swift, obsoleted: 4.1, renamed: "attemptConnection")
func testConnection() { }
@available(swift, deprecated: 4.0, obsoleted: 5.0, message: "This will be removed in v5.0; please migrate to a different API.")