LeoNatan / LNNotificationsUI

A framework for displaying notifications similar to Apple's iOS 8 and iOS 9 notifications.
MIT License
787 stars 115 forks source link

Purpose of the drawer? Setting to disable it? #19

Closed allaire closed 9 years ago

allaire commented 9 years ago

In my head, the little drawer at the bottom is there to pull it down and reveal the full notification center on iOS. since this is not the case with this lib, I would like to hide it. Are you interested in a PR that adds a setting to disable it?

Thanks!

LeoNatan commented 9 years ago

I would actually prefer a PR with an implementation of the actual drawer purpose on iOS8 - present custom actions and text input. However I have not found the time to sit and do it.

allaire commented 9 years ago

A complete drawer would be cool, but much more time consuming to do. I plan to use LNNotificationsUI as my notification system when the user receives an notification when he's using the app, so hiding the drawer control is required in my case.

LeoNatan commented 9 years ago

Since the drawer is very easy to hide, let's keep it as is for now. I will find the time eventually to make the drawer. Perhaps iOS9 will inspire me.

allaire commented 9 years ago

@LeoNatan What do you mean by very easy to hide? I'm talking about https://github.com/LeoNatan/LNNotificationsUI/blob/master/LNNotificationsUI/LNNotificationsUI/LNNotificationBannerView.m#L211-L254

LeoNatan commented 9 years ago

Yes, and commenting these lines is very easy. :-)

allaire commented 9 years ago

@LeoNatan but since I'm using Cocoapods, each time I update, it will get overwritten, so it's not optimal :-1:

LeoNatan commented 9 years ago

My problem with such API is that I need to expose API which is not normally public API. None of the view hierarchy is exposed, nor are there any rendering settings available. So only place left is the notification itself, but that is not the correct place for this issue. Sorry

allaire commented 9 years ago

Hi Leo,

I think this will be inevitable at some point to expose an API to customize some elements of the UI like most librairies.

I'm open to discuss any API design with you so we can find a solution :)

Let me know, thanks!

LeoNatan commented 9 years ago

Well, the intent of this library is to give you as much of a native experience as possible. As long as iOS does not provide customization API, I am not sure I want to.

Thanks

allaire commented 9 years ago

Heh that's your library, I think having a couple visual settings here and here is not a bad thing, but ultimately it's your call. Have a nice day!