When I tried to use UIImage(named:) in an init of an object, I had got the following error.
I fixed it by adding an initializer before it. I found that in UIImage Class Reference, init(name:) is classified as "Cached Image Loading Routines", and others are classified as "Initializing Images". Does it mean init(named:) doesn't perform initialization?
當我使用 UIImage(named:) 時, 我得到以下錯誤.
我把一個 initializer 放在前面就解決這個問題. 在 UIImage Class Reference, init(named:) 是被分類為"Cached Image Loading Routines", 而其他被分類為"Initializing Images". 意思是不是 init(named:) 不會進行初始?
No comments:
Post a Comment