pkluz / PKHUD

A Swift based reimplementation of the Apple HUD (Volume, Ringer, Rotation,…) for iOS 8.
MIT License
3.79k stars 494 forks source link

Swift 4 App is crashed when display the PKHUD. #207

Closed mob-rockstar closed 7 years ago

mob-rockstar commented 7 years ago

I tried to display the PKHUD in ViewController. Code snippet is followings; HUD.dimsBackground = true HUD.allowsInteraction = false HUD.show(.progress)

I am receiving following errror: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '<PKHUD.PKHUDProgressView: 0x7ff2f1f56f30; frame = (0 0; 156 156); clipsToBounds = YES; alpha = 0.85; layer = <CALayer: 0x60800022c8c0>> has been added as a subview to <PKHUD.FrameView: 0x7ff2f1f47630; baseClass = UIVisualEffectView; frame = (0 0; 156 156); clipsToBounds = YES; autoresize = LM+RM+TM+BM; layer = <CALayer: 0x600000230ea0>>. Do not add subviews directly to the visual effect view itself, instead add them to the -contentView.'

Please let me know the solutions.

PGLongo commented 7 years ago

Upgrade to the latest version

pod 'PKHUD', '~> 5.0'