Closed jcoleman closed 11 years ago
All right, I've done the initial cleanup work to bring the code into convention with the existing project.
I have a few other thoughts/questions, but I'll have to finish those up tomorrow.
I'm liking how this is shaping up though.
@psineur Shouldn't the new style use different drawing for the notification view? I mean, I'm assuming the goal is to mimic the iOS native notification. So then it would need to have white rectangle with all four corners rounded.
Also, if we're going to the use the "rotation animation", then shouldn't we remove the slide down animation?
Yes, in the demo app ,there's a custom slider now, when it's on - it gives you that white view.
How about to introduce new parameter, i.e.
typedef enum
{
kJCNotificationBannerStyleAndroidToast,
kJCNotificationBannerStyleIOSNative
} JCNotificationBannerStyle
Interesting. For some reason when I turn on that slider, I get basically the white background (though it doesn't have rounded corners) but the black slide down style is visible on top of that.
Gonna check this now. You're using 2 space indents?
Just don't remove -drawRect: https://github.com/psineur/JCNotificationBannerPresenter/commit/5db7db72b3d18aaf5af8dad138e4834e58009290
Additional commits: https://github.com/jcoleman/JCNotificationBannerPresenter/pull/5 And now you can push to my fork. :ship: :it:
All right, I really like this.
The only real thing I changed other than code cleanup was to reorder the style parameter in commit 080662f8884a14060251b003db1eec3b881ed2da so that the block parameter remains the final argument for code cleanliness sake.
Thanks for the hard work on this!
Cool, I like block as last argument more. Thanks!
Incidentally, I think you'll want to make sure you're using the latest master. I move some files into the correct folder structure (the style class you added was in the Demo folder rather than in the Library folder which was messing up CocoaPods.)
This is essentially pull request #3 -- I had to pull it into a new branch on my project to make changes without merging into master.
Original pull request description:
@jcoleman @abram Hello guys!
Thanks for your work on notification banner. I've changed it's behavior to something like banner notification built in iOS. Video: http://www.youtube.com/watch?v=XDoUKR8co80
Can we have this functionality merged? I've based by changes on @abram's customization.
So this is tested in all orientations on iPad 2 (iOS 6) & iPod Touch (iOS 6)
What do you think? I like old implementation (Android-like Toast) too, so maybe we should add argument that selects mode?
Also, because it's not possible (as far as i know) to make a screenshot of statusBar, new banner mode should be used without coverStatusBar.
Anyway, i would like to hear back from you and polish this code, so it can be merged. Cheers!