0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

xcodeにて初回のボタンの反応(判定)が悪い場合について

Posted at

原因と対処法

xcodeのログで下の警告が発生している場合の解決方法です。

Failed to create 0x88 image slot (alpha=1 wide=1) (client=0xc49b7112) [0x5 (os/kern) failure]" in tap to button

原因としては、ナビゲーションバーとボタンの位置が重なっているため発生していました。
よってナビゲーションバーを非表示にする必要があるため、非表示にする下のコードを使う。

self.navigationController?.setNavigationBarHidden(true, animated: false)

画面関係である viewDidLoad・viewDidLayoutSubviews などに付け足したらいいと思います。

viewDidLoadやviewDidLayoutSubviewsなどの実行される順番や回数などについて

一度だけ実行されるやつ・画面遷移した際に実行されるやつ など色々あるため見る価値あり
https://qiita.com/reo0612/items/1dc1a18a385622118bbb

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?