problame / CSNotificationView

Drop-in, semi-translucent and blurring notification view.
MIT License
900 stars 152 forks source link

iOS 8 compatibility (iOS 8 only!) #36

Closed Jeehut closed 9 years ago

Jeehut commented 10 years ago

I fixed issue https://github.com/problame/CSNotificationView/issues/35 which happened as a result of a IMHO not so clean solution for blur views. In my fix I am using the UIVisualEffectView and UIBlurEffect classes introduced in iOS 8. As iOS 7 doesn't include those classes (AFAIK) this will only work on devices using iOS 8 or later.

problame commented 10 years ago

At first big thanks for your contribution. I have been busy lately but wanted to come back to the project before the iOS 8 launch.

Currently, the project can even target iOS 6 (see #29). I have never been a big fan of iOS 6 support but since it was basically no effort, I merged the pull request.

CSNotificationView's UI is very relevant regarding iOS 7 and I would like to keep supporting it.

I think it would be best to not directly subclass CSNotificationView from UIVisualEffectView but to make the blur/transparency effect an exchangeable subview:

I think it is best to drop iOS 6 support for the moment to get something done before iOS 8 is released. Maybe @bcylin is re-adding iOS 6 after the refactoring is complete.

I made this an issue #37. The issues #38 and #39 depend on #37. I'll do the restructuring and incorporate as many of your code as I can.

Thanks again!

Jeehut commented 10 years ago

I completely agree with you, I just needed to fix this for a iOS 8 only project very quickly so this is what I came up with given the limited time I had. I like the approach of a separate class for the blur effect to support older versions, love to see that coming in the near future. Thanks for this great project! ;)

bcylin commented 10 years ago

I think it's about time to drop iOS 6 support since most apps will do so after iOS 8 releases. :beers:

problame commented 10 years ago

I'll sit down tomorrow morning (GMT+2) and do the refactoring...

problame commented 10 years ago

Please have a look at issue #37!