[xcode] Resolve Purple warning or “This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes” Error

on Xcode, many “This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes” Error has been happened.

or on xcode, purple warning will be appeared.

スクリーンショット 2017-10-15 16.35.58

though app is not down, Tried to resolve.

Change from

indicator.isHidden = true

To

 DispatchQueue.main.async {
       indicator.isHidden = true
 }

by “DispatchQueue.main.async”, let code run on main thread. then error has been disappeared.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です