Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Notification unveil #108

Merged
merged 5 commits into from
Oct 2, 2016

Conversation

tkohout
Copy link
Contributor

@tkohout tkohout commented Jul 30, 2016

I have added new feature to unveil rest of the notification if it doesn't fit. Additionally I enlarged the gestureContainer to the whole area of notification. It does work similar as the apple system notifications.

Preview:

whisper-unveil2

LucidityDesign and others added 2 commits July 13, 2016 16:28
Fixes hyperoslo#101 and ensures that 2 line text increases the shouts height
@mention-bot
Copy link

@tkohout, thanks for your PR! By analyzing the annotation information on this pull request, we identified @RamonGilabert and @onmyway133 to be potential reviewers

Copy link
Contributor

@zenangst zenangst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good, just made a few comments about some minor stuff that we probably want to fix up before merging.

Dimensions.height = UIApplication.sharedApplication().statusBarHidden ? 70 : 80

Dimensions.height = UIApplication.sharedApplication().statusBarHidden ? 55 : 65
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you go ahead and remove this whitespace? 😁

@@ -218,15 +220,24 @@ public class ShoutView: UIView {
announcement.action?()
silent()
}


var subtitleLabelOriginalHeight: CGFloat = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably have this var at the top of the file instead of in between method declarations.

if panGestureRecognizer.state == .Began {
subtitleLabelOriginalHeight = self.subtitleLabel.bounds.size.height
self.subtitleLabel.numberOfLines = 0
self.subtitleLabel.sizeToFit()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to reference self here?

@@ -235,14 +246,17 @@ public class ShoutView: UIView {
let height = translation.y < -5 || shouldSilent ? 0 : Dimensions.height

duration = 0.2

self.subtitleLabel.numberOfLines = 2
self.subtitleLabel.sizeToFit()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably drop self here as well.

@tkohout
Copy link
Contributor Author

tkohout commented Sep 29, 2016

Thanks for the reply,
I've used #102 as a base for this feature and I've recently noticed some problems when the shout layout is reloaded.

I will send fixes for this and mentioned minor stuff over the weekend.

Cheers
Tomas

@tkohout
Copy link
Contributor Author

tkohout commented Oct 1, 2016

Done. I added the required changes and fixed the issue with the orientation change.

@zenangst zenangst merged commit ad69a65 into hyperoslo:master Oct 2, 2016
@zenangst
Copy link
Contributor

zenangst commented Oct 2, 2016

@tkohout thanks mate, this is great!

unknown-9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants