Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
画像がない場合はフレームを変更せずに単純な場合に問題を「修正」できますが、何かが欠けていないことを確認したいと思います。
ボタンを nil に設定した後、ボタンの画像がはっきりしないというバグがありましたが、これは場合によってのみ発生します。
デバッグ後、画像をnilで設定した後にフレームを変更すると、その画像がまだ表示されることがわかりました。
UIButton の画像をクリアする方法はありますか?
ありがとう。
これを行う。
if[myButton imageForState:UIControlStateNormal]!=nil) { [myButton setImage:nil forState:UIControlStateNormal]; }