5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

NSMakeRange 「warning: Legacy Constructor Violation」

Posted at

メモ

NSMakeRangeのコンストラクタが古い

xxx.swift:76:108: warning: Legacy Constructor Violation: Swift constructors are preferred over legacy convenience functions. (legacy_constructor)

Swift3.0から古い書き方が切り捨てられるそうで、下記に書き換える

NSRange(location: 0, length: 10)

使用環境

XCode7.3
SwiftLint 0.9.1
Apple Swift version 2.2 (swiftlang-703.0.18.1 clang-703.0.29)

5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?