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

iOS 7 compatibilty #11

Closed flowbe closed 9 years ago

flowbe commented 9 years ago

Hello, I would like to use your awesome code for my app but I want it to be compatible with iOS 7. Is it possible ? Thank you very much

ghost commented 9 years ago

Swift libraries are compatible with iOS 7 if you drag-and-drop the files into your project.

flowbe commented 9 years ago

Yes but UIVisualEffectsView isn't compatible with iOS 7. Also when I launch my app in iOS 7.1 Simulator, I get this error in HUDAssets.swift:

+[UIImage imageNamed:inBundle:compatibleWithTraitCollection:]: unrecognized selector sent to class 0x10db36120

pkluz commented 9 years ago

I'm not currently convinced I want this lib to be backwards compatible and take care of lots of if/else branches for ios7/8... open for input though.

flowbe commented 9 years ago

Can you just help me to support iOS 7 so I can use your framework in my app please :) Thanks

pkluz commented 9 years ago

You can theoretically just change this line: internal class FrameView: UIVisualEffectView { to this: internal class FrameView: UIView{

and remove the other lines in the file that are now shown as errors.

In theory, you are now iOS 7 compatible (haven't double checked) - Remember: You will lose the fancy blur of the background. iOS 7 does not support that.