日々精進

新しく学んだことを書き留めていきます

2014-04-19から1日間の記事一覧

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

以下のように、delegateに代入するとエラーになる。 self.urlDownloader?.delegate = self以下のようにunwrapすると直る。 self.urlDownloader!.delegate = self以下のサイトの記事ではこの原因は「self.urlDownloader?を評価した結果、nilになることがある…