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

General Cleanup For Cocoapods #57

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

General Cleanup For Cocoapods #57

wants to merge 18 commits into from

Conversation

twof
Copy link

@twof twof commented Jan 7, 2019

  • Added a license
  • Bumped Swift version to 4.2
  • Bumped iOS release version from 10.1 to 10.3
  • All warnings silenced for cocoapods linter except from the tag requirement warning which will be fixed upon merge and tag

Copy link
Collaborator

@radimhalfar radimhalfar left a comment

Choose a reason for hiding this comment

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

👏 Look good, please update minors and we can merge it

case .aspectFit: previewLayer.videoGravity = AVLayerVideoGravity.resizeAspect
case .resize: previewLayer.videoGravity = AVLayerVideoGravity.resize

private func applyVideoDisplayMode() { switch displayMode {
Copy link
Collaborator

Choose a reason for hiding this comment

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

fix alignment

@IBOutlet weak var imageView: UIImageView!

public final class ActionCell : UICollectionViewCell {

Copy link
Collaborator

Choose a reason for hiding this comment

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

don't use extra opening lines



public func setupOffsets() {
topOffset.constant = 5
Copy link
Collaborator

Choose a reason for hiding this comment

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

DRY, keep 5 to a constant

durationLabel.textColor = UIColor.white
durationLabel.font = UIFont.systemFont(ofSize: 12, weight: .semibold)
durationLabel.font = UIFont.systemFont(ofSize: 12, weight: UIFont.Weight.semibold)
Copy link
Collaborator

Choose a reason for hiding this comment

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

keep .semibold

fileprivate var textAttributes: TextAttributes {
let activeFont = font ?? UIFont.systemFont(ofSize: 12, weight: .regular)
let activeFont = font ?? UIFont.systemFont(ofSize: 12, weight: UIFont.Weight.regular)
Copy link
Collaborator

Choose a reason for hiding this comment

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

keep .regular

//perform update animations
collectionViewCoordinator.performChanges(changes, inSection: layoutConfiguration.sectionIndexForAssets)
collectionViewCoordinator.performChanges(changes as! PHFetchResultChangeDetails<PHObject>, inSection: layoutConfiguration.sectionIndexForAssets)
Copy link
Collaborator

Choose a reason for hiding this comment

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

don't use force casts, rather assert it or guard it

//update authorization status if it's changed
let status = AVCaptureDevice.authorizationStatus(for: .video)
let status = AVCaptureDevice.authorizationStatus(for: AVMediaType.video)
Copy link
Collaborator

Choose a reason for hiding this comment

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

keep .video only

label.translatesAutoresizingMaskIntoConstraints = false
label.textAlignment = .center
label.numberOfLines = 0
label.font = .systemFont(ofSize: 17, weight: UIFont.Weight.regular)
Copy link
Collaborator

Choose a reason for hiding this comment

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

keep .regular

let button = UIButton(type: .system)
button.translatesAutoresizingMaskIntoConstraints = false
button.setTitle(NSLocalizedString("Go to Settings", comment: ""), for: .normal)
button.titleLabel?.font = .systemFont(ofSize: 20, weight: UIFont.Weight.semibold)
Copy link
Collaborator

Choose a reason for hiding this comment

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

.semibold

// }

// @available(iOS 11.0, *)
// func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove commented out code

@twof
Copy link
Author

twof commented Jan 18, 2019

Thanks for your feedback! I no longer have edit access at the Redbooth org, so @lollar or Eli is going to have to fix this up. (Mike can you tag Eli? I don't remember his handle. Also feel free to reach out to me if you want help fixing this up.)

xavisavvy and others added 4 commits May 15, 2019 23:00
- Updated all the plist settings w/ any new configs
- Removed unnecessary / extra public function calls
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.

None yet

5 participants