MPNotificationView icon indicating copy to clipboard operation
MPNotificationView copied to clipboard

iOS 7 styled notification view

Open zetachang opened this issue 11 years ago • 8 comments

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

zetachang avatar Jul 02 '13 08:07 zetachang

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 ([email protected]) 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 avatar Jul 02 '13 08:07 ekurutepe

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.

ekurutepe avatar Aug 21 '13 09:08 ekurutepe

Cool, really looking forward to it!

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

zetachang avatar Aug 21 '13 12:08 zetachang

I'd like to see this done, too!

rcdilorenzo avatar Oct 02 '13 17:10 rcdilorenzo

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 avatar Oct 06 '13 20:10 ekurutepe

@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. :)

ekurutepe avatar Oct 06 '13 20:10 ekurutepe

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

zetachang avatar Oct 10 '13 03:10 zetachang

 // 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.

euanlau avatar Jul 12 '14 07:07 euanlau