Interface cleanup#114
Conversation
This way one can directly call the `fadeMeOut` method on the actual view instead of having to call `[TSMessage dismissActiveNotification]` (which would be necessary if you want to dismiss the view programmatically in the callback, because you have disabled manual dismiss via `canBeDismissedByUser:NO`). I find it better to deal with the actual instance of the view rather than relying on it being the currently active notification. Right now it is only possible for it being the currently active notification, but these changes will make sense in conjunction with the next changes I'd like to propose in the next commits. ;)
Permanent notifications differ from normal ones in that permanent messages are not contained in the messages queue and can be displayed in addition to the other messages. Permanent notifications do not get dismissed automatically, hence they do not have a duration but have to be dismissed by the user or programmatically in one of the callbacks. The constructor for a permanent message also returns the instance of the message view, so that one can also capture it and dismiss it with other custom events.
This is so we can go forward and remove some of the incomplete edge case handling when calculating height and offset of the message view in `fadeInNotification:`, which depends on the statusbar and navigationbar being present or not. The demo project now works for all cases and shows the buttons to toggle statusbar and navigationbar.
notification -> message show -> display fadeOut -> dismiss
|
You Sir, are amazing! Thanks for the great contribution. I'm taking a look at those changes right now 👍 |
|
Points I noticed:
I guess it would also be fine to merge the following pull requests into the develop branch here:
I guess that would be a really nice 1.0 release:
|
Yes, I'll take care of this.
Yep. |
|
I've added the latest two commits on develop so that we can progress from there. This pull request won't need merging as its commits will be merged into master when we reach 1.0 on the develop branch and merge it from there. |
|
Hey @pengwynn, might this pull request be worth an Atom invite? :) |
These are the changes I already talked to @KrauseFx about and want to propose to all of you so that we can talk about this interface cleanup.
Lots of breaking changes here, but I considered them necessary to support further development of TSMessages. It all started out with refactoring the initializers (0ae2927), which is also the biggest commit of this pull request. Another notable commit includes the naming changes (a614835) as well as dropping support for iOS 6 (cfb623d).
Feedback is welcome :)