ekurutepe / MPNotificationView

An in-app notification view that mimics the iOS 6 notification views which appear above the status bar
MIT License
346 stars 55 forks source link

iOS 7 styled notification view #27

Open zetachang opened 11 years ago

zetachang commented 11 years ago

iOS 7 got a new style of notification view, any plan on having a new look for new OS ?

ekurutepe commented 11 years ago

Of course, but I still get my head around the new animation. I can't tell if it's a simple slide or something more complicated is going on.

This is not a high priority though, I'm sure we'll see some changes there until the release. 

Engin Kurutepe

On 2. Juli 2013 at 10:09:08, David Chang (notifications@github.com) wrote:

iOS 7 got a new style of notification view, any plan on having a new look for new OS ?

— Reply to this email directly or view it on GitHub.

ekurutepe commented 11 years ago

Now that the builds seem to be more stable and final, as far as I can tell the new system notifications have a black background with some transparency and blur effect going on. The animation itself seems to be a simple slide. Shouldn't be too hard to implement.

MPNotificationView will default to the old style on older systems and use the new style on iOS 7 only.

zetachang commented 11 years ago

Cool, really looking forward to it!

For the blur effect, I think this may help :smiley_cat:

rcdilorenzo commented 11 years ago

I'd like to see this done, too!

ekurutepe commented 11 years ago

I found some time to hack on this today. It's not perfect yet but it's a start: https://github.com/ekurutepe/MPNotificationView/commit/8417fb997fc32e78c39a187dc8fe6e5ad49d679d

ekurutepe commented 11 years ago

@zetachang I used the idea from the link you mentioned but did not bother to steal the layer. I just use a UIToolbar instance as the background view in a notification. :)

zetachang commented 11 years ago

Hi, it looks great! But it it necessary the height of notification view to be 60 point? Since in the system notification view, the extra space is used to contain a hand hold which is used to reveal the notification center. Here is an example,

ios-7-notifications-slide-up

euanlau commented 10 years ago
 // If your app is running in legacy mode, tintColor will be nil - else it must be set to some color.
if (UIApplication.sharedApplication.keyWindow) {
    isUIKitFlatMode = [UIApplication.sharedApplication.keyWindow performSelector:@selector(tintColor)] != nil;
}else {
    // Possible that we're called early on (e.g. when used in a Storyboard). Adapt and use a temporary window.
    isUIKitFlatMode = [[UIWindow new] performSelector:@selector(tintColor)] != nil;
}

https://gist.github.com/steipete/6526860 The above doesn't work anymore.