We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caution の数が多そうであれば種類別に PR を分けて対応する。 #1 (comment)
特に force_cast force_try force_unwrapping をなるべく避けるようにするとよりSwiftらしくなると思います。
例えばこの辺のforce unwrappingを治すとしたら、 var dataを暗黙的アンラップ型で定義して、dataに値が渡ってなかったら非正常系というのを型で表現し、try ~ catchで例外を補足して適当にエラー表示する Optional Chaining、Optional Bindingを使って、dataにデータが渡されてるとき(正常系)と、渡されてないとき(非正常系)を表示分けする if let thumbnailUlr = data?.thumbnailUrl, !thumbNailUrl.isEmpty { // データがあるとき } else { // データがないとき } のどちらかといった感じです。
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Caution の数が多そうであれば種類別に PR を分けて対応する。
#1 (comment)
The text was updated successfully, but these errors were encountered: