Skip to content

Commit

Permalink
Merge pull request #416 from Wisors/fix_LiveCameraCell_appearance
Browse files Browse the repository at this point in the history
Fix LiveCameraAppearance
  • Loading branch information
AntonPalich authored Dec 7, 2017
2 parents 6d1973f + 1a571c6 commit fd368c3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ChattoAdditions/Source/Input/Photos/LiveCameraCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class LiveCameraCell: UICollectionViewCell {

var appearance: LiveCameraCellAppearance = LiveCameraCellAppearance.createDefaultAppearance() {
didSet {
self.contentView.backgroundColor = self.appearance.backgroundColor
self.updateAppearance()
}
}

Expand Down Expand Up @@ -114,6 +114,11 @@ class LiveCameraCell: UICollectionViewCell {
self.contentView.addSubview(self.iconImageView)
}

private func updateAppearance() {
self.contentView.backgroundColor = self.appearance.backgroundColor
self.updateIcon()
}

private func updateIcon() {
switch self.authorizationStatus {
case .notDetermined, .authorized:
Expand Down

0 comments on commit fd368c3

Please sign in to comment.