Search code examples
iosswiftcustom-viewxcode-instruments

Custom View is very slow


On iOS8-Xcode7.1-Swift2.1,Custom UIView is very slow.

On iOS9 is not slow.

I have checked the above things by Time Profilier.

'super.init(coder: aDecoder)' took 2 seconds.

I attached Time Profilier capture.

But i never experienced such a situation.

What is this problem?

enter image description here

enter image description here


Solution

  • I could reslove this problem by a hint of @David Wong. Thank you.

    Font list is differnt between iOS8 and iOS9. 'HiraginoSans' is available from iOS9. If iOS8 try to use this font,device have to download at first. That's why view load is very slow loading.

    Mac has Font family on FontBook. I could resove it by importing above font to xcode project.

    Thank you.