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

Shout colors #32

Merged
merged 2 commits into from
Jan 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Demo/WhisperDemo/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Whisper (0.1.0)
- Whisper (1.0.0)

DEPENDENCIES:
- Whisper (from `../../`)
Expand All @@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:path: ../../

SPEC CHECKSUMS:
Whisper: abe5fb037164042d2e7069fc6af6a788db611d81
Whisper: 7da96cacd120f2202079ee47fe07bd356815d438

COCOAPODS: 0.39.0.beta.4
14 changes: 3 additions & 11 deletions Source/ShoutFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ public class ShoutView: UIView {
return view
}()

public private(set) lazy var blurView: UIVisualEffectView = {
let blurView = UIVisualEffectView(effect: UIBlurEffect(style: .ExtraLight))
return blurView
}()

public private(set) lazy var gestureContainer: UIView = {
let view = UIView()
view.userInteractionEnabled = true
Expand Down Expand Up @@ -59,7 +54,7 @@ public class ShoutView: UIView {
public private(set) lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = FontList.Shout.title
label.tintColor = ColorList.Shout.title
label.textColor = ColorList.Shout.title
label.numberOfLines = 1

return label
Expand All @@ -68,7 +63,7 @@ public class ShoutView: UIView {
public private(set) lazy var subtitleLabel: UILabel = {
let label = UILabel()
label.font = FontList.Shout.subtitle
label.tintColor = ColorList.Shout.subtitle
label.textColor = ColorList.Shout.subtitle
label.numberOfLines = 1

return label
Expand Down Expand Up @@ -100,9 +95,8 @@ public class ShoutView: UIView {
super.init(frame: frame)

addSubview(backgroundView)
backgroundView.addSubview(blurView)
[indicatorView, imageView, titleLabel, subtitleLabel, gestureContainer].forEach {
blurView.addSubview($0) }
backgroundView.addSubview($0) }

clipsToBounds = false
userInteractionEnabled = true
Expand Down Expand Up @@ -178,7 +172,6 @@ public class ShoutView: UIView {
let offset: CGFloat = UIApplication.sharedApplication().statusBarHidden ? 2.5 : 5

backgroundView.frame.size = CGSize(width: totalWidth, height: Dimensions.height)
blurView.frame = backgroundView.bounds
gestureContainer.frame = CGRect(x: 0, y: Dimensions.height - 20, width: totalWidth, height: 20)
indicatorView.frame = CGRect(x: (totalWidth - Dimensions.indicatorWidth) / 2,
y: Dimensions.height - Dimensions.indicatorHeight - 5, width: Dimensions.indicatorWidth, height: Dimensions.indicatorHeight)
Expand Down Expand Up @@ -248,7 +241,6 @@ public class ShoutView: UIView {

UIView.animateWithDuration(duration, animations: {
self.backgroundView.frame.size.height = self.frame.height
self.blurView.frame.size.height = self.frame.height
self.gestureContainer.frame.origin.y = self.frame.height - 20
self.indicatorView.frame.origin.y = self.frame.height - Dimensions.indicatorHeight - 5
})
Expand Down