-1
たとえば、私は次のコードのための警告を参照してください。スウィフトiOSの - どのように1は、if文のビルド時の警告で、ネストされた変数を修正する必要があり
var currentButtonLocation = self.view.frame
if let button = view.viewWithTag(11) as? UIButton {
currentButtonLocation = button.frame
}
次のエラーを生成します。
Variable 'currentButtonLocation' was written to, but never read
このリンクを参照してください[リンク](http://stackoverflow.com/questions/32622790/variable-was-written-but-never-read) –
あなたは 'currentButtonLocation'の値を使用していません。他の変数に割り当てるか、使用しない場合は削除してください。 –
ありがとうございます - 私は読み書き対読書を混乱させていました。 – SwiftLanding