以下の内容はhttps://anton0825.hatenablog.com/entry/20140419/1406020269より取得しました。


delegateにオブジェクトを代入すると「Cannot assign to the result of this expression」エラー

以下のように、delegateに代入するとエラーになる。

self.urlDownloader?.delegate = self

以下のようにunwrapすると直る。

self.urlDownloader!.delegate = self

以下のサイトの記事ではこの原因は「self.urlDownloader?を評価した結果、nilになることがあるため」と推測している。
optionalが代入式の左についていたらエラーになるっぽい。
参考:Cannot assign to the result of this expression error in Swift




以上の内容はhttps://anton0825.hatenablog.com/entry/20140419/1406020269より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14