diff --git a/MyWeight.xcodeproj/xcshareddata/xcschemes/MyWeight.xcscheme b/MyWeight.xcodeproj/xcshareddata/xcschemes/MyWeight.xcscheme index 3e30e91..31259a4 100644 --- a/MyWeight.xcodeproj/xcshareddata/xcschemes/MyWeight.xcscheme +++ b/MyWeight.xcodeproj/xcshareddata/xcschemes/MyWeight.xcscheme @@ -86,7 +86,7 @@ CFBundleDevelopmentRegion en - CFBundleExecutable - $(EXECUTABLE_NAME) CFBundleDisplayName MyWeight + CFBundleExecutable + $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 5 + 6 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS diff --git a/MyWeight/Resources/en.lproj/Localizable.strings b/MyWeight/Resources/en.lproj/Localizable.strings index 1b75698..a3ffe30 100644 --- a/MyWeight/Resources/en.lproj/Localizable.strings +++ b/MyWeight/Resources/en.lproj/Localizable.strings @@ -14,7 +14,7 @@ "Authorization.Description.text.highlight2" = "data is securely encrypted and won't be shared with anyone"; -"Authorization.Description.text" = "My Weight needs access to Health in order to store your entries.\n\nThis means your weight data is securely encrypted and won't be shared with anyone.\n\nYou’ll be able to revoke this permission at any time."; +"Authorization.Description.text" = "MyWeight needs access to Health in order to store your entries.\n\nThis means your weight data is securely encrypted and won't be shared with anyone.\n\nYou’ll be able to revoke this permission at any time."; "Authorization.OkButton.text" = "Got it"; @@ -24,7 +24,7 @@ "Denied.Description.text.highlight1" = "Health"; -"Denied.Description.text" = "My Weight needs access to Health in order to store your entries."; +"Denied.Description.text" = "MyWeight needs access to Health in order to store your entries."; "Denied.Health.text" = "Tap Health"; diff --git a/MyWeight/Resources/pt-BR.lproj/Localizable.strings b/MyWeight/Resources/pt-BR.lproj/Localizable.strings index 92a9e07..6367519 100644 --- a/MyWeight/Resources/pt-BR.lproj/Localizable.strings +++ b/MyWeight/Resources/pt-BR.lproj/Localizable.strings @@ -14,7 +14,7 @@ "Authorization.Description.text.highlight2" = "dados de seu peso serão criptografados de maneira segura"; -"Authorization.Description.text" = "Meu Peso precisa de acesso ao app Saúde para salvar suas medidas.\n\nIsso significa que os dados de seu peso serão criptografados de maneira segura.\n\nVocê pode cancelar essa permissão a qualquer momento."; +"Authorization.Description.text" = "MeuPeso precisa de acesso ao app Saúde para salvar suas medidas.\n\nIsso significa que os dados de seu peso serão criptografados de maneira segura.\n\nVocê pode cancelar essa permissão a qualquer momento."; "Authorization.OkButton.text" = "Ok"; @@ -24,7 +24,7 @@ "Denied.Description.text.highlight1" = "Saúde"; -"Denied.Description.text" = "Meu Peso precisa de acesso ao app Saúde para salvar suas medidas."; +"Denied.Description.text" = "MeuPeso precisa de acesso ao app Saúde para salvar suas medidas."; "Denied.Health.text" = "Entre em Saúde"; diff --git a/MyWeight/Screens/Add/AddView.swift b/MyWeight/Screens/Add/AddView.swift index d7d85cf..825fae7 100644 --- a/MyWeight/Screens/Add/AddView.swift +++ b/MyWeight/Screens/Add/AddView.swift @@ -13,10 +13,18 @@ public class AddView: UIView { let massPicker: MassPicker = MassPicker() let datePicker: UIDatePicker = UIDatePicker() - let saveButton: TintButton = TintButton() + let saveButton: TintButton = { + let button = TintButton() + button.setContentHuggingPriority(UILayoutPriorityRequired, for: .vertical) + return button + }() let cancelButton: UIButton = UIButton(type: .system) - let titleLabel: UILabel = UILabel() + let titleLabel: UILabel = { + let label = UILabel() + label.setContentHuggingPriority(UILayoutPriorityRequired, for: .vertical) + return label + }() let style: StyleProvider = Style() diff --git a/MyWeight/Transitions/ModalTransition.swift b/MyWeight/Transitions/ModalTransition.swift index 0effa5c..9f7d09d 100644 --- a/MyWeight/Transitions/ModalTransition.swift +++ b/MyWeight/Transitions/ModalTransition.swift @@ -38,7 +38,7 @@ UIViewControllerAnimatedTransitioning { func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { - return style.animationTime + return style.animationDuration } func animateTransition(using transitionContext: UIViewControllerContextTransitioning) @@ -85,6 +85,8 @@ UIViewControllerAnimatedTransitioning { to.view.layer.masksToBounds = true UIView.animate(withDuration: transitionDuration(using: transitionContext), + delay: 0, + options: [.curveEaseOut], animations: { from.view.tintAdjustmentMode = .dimmed blackView.alpha = 1.0 @@ -112,6 +114,8 @@ UIViewControllerAnimatedTransitioning { to.view.frame = view.bounds UIView.animate(withDuration: transitionDuration(using: transitionContext), + delay: 0, + options: [.curveEaseIn], animations: { to.view.tintAdjustmentMode = .automatic blackView.alpha = 0.0 diff --git a/MyWeight/Views/Style.swift b/MyWeight/Views/Style.swift index 4e98274..aa71da9 100644 --- a/MyWeight/Views/Style.swift +++ b/MyWeight/Views/Style.swift @@ -30,7 +30,7 @@ public protocol StyleProvider { var grid: CGFloat { get } - var animationTime: TimeInterval { get } + var animationDuration: TimeInterval { get } } public struct Style: StyleProvider { @@ -55,7 +55,7 @@ public struct Style: StyleProvider { public let grid: CGFloat = 8 - public let animationTime: TimeInterval = 0.6 + public let animationDuration: TimeInterval = 0.3 static let teal = UIColor(red: 81/255, green: 203/255, blue: 212/255, alpha: 1) static let black = UIColor(red: 67/255, green: 70/255, blue: 75/255, alpha: 1) diff --git a/MyWeightTests/ReferenceImages/AccessDeniedViewControllerTests/AccessDeniedViewControllerTests___iPhone_4_7_@2x.png b/MyWeightTests/ReferenceImages/AccessDeniedViewControllerTests/AccessDeniedViewControllerTests___iPhone_4_7_@2x.png index c101f77..e3dc54a 100644 Binary files a/MyWeightTests/ReferenceImages/AccessDeniedViewControllerTests/AccessDeniedViewControllerTests___iPhone_4_7_@2x.png and b/MyWeightTests/ReferenceImages/AccessDeniedViewControllerTests/AccessDeniedViewControllerTests___iPhone_4_7_@2x.png differ diff --git a/MyWeightTests/ReferenceImages/AccessDeniedViewControllerTests/AccessDeniedViewControllerTests___iPhone_4_@2x.png b/MyWeightTests/ReferenceImages/AccessDeniedViewControllerTests/AccessDeniedViewControllerTests___iPhone_4_@2x.png index fb25279..cb7c13f 100644 Binary files a/MyWeightTests/ReferenceImages/AccessDeniedViewControllerTests/AccessDeniedViewControllerTests___iPhone_4_@2x.png and b/MyWeightTests/ReferenceImages/AccessDeniedViewControllerTests/AccessDeniedViewControllerTests___iPhone_4_@2x.png differ diff --git a/MyWeightTests/ReferenceImages/AccessDeniedViewControllerTests/AccessDeniedViewControllerTests___iPhone_5_5_@2x.png b/MyWeightTests/ReferenceImages/AccessDeniedViewControllerTests/AccessDeniedViewControllerTests___iPhone_5_5_@2x.png index 3a06b24..a5b4eb0 100644 Binary files a/MyWeightTests/ReferenceImages/AccessDeniedViewControllerTests/AccessDeniedViewControllerTests___iPhone_5_5_@2x.png and b/MyWeightTests/ReferenceImages/AccessDeniedViewControllerTests/AccessDeniedViewControllerTests___iPhone_5_5_@2x.png differ diff --git a/MyWeightTests/ReferenceImages/AuthorizationRequestViewControllerTests/AuthorizationRequestViewController___iPhone_4_7_@2x.png b/MyWeightTests/ReferenceImages/AuthorizationRequestViewControllerTests/AuthorizationRequestViewController___iPhone_4_7_@2x.png index 98e2093..3d8dd21 100644 Binary files a/MyWeightTests/ReferenceImages/AuthorizationRequestViewControllerTests/AuthorizationRequestViewController___iPhone_4_7_@2x.png and b/MyWeightTests/ReferenceImages/AuthorizationRequestViewControllerTests/AuthorizationRequestViewController___iPhone_4_7_@2x.png differ diff --git a/MyWeightTests/ReferenceImages/AuthorizationRequestViewControllerTests/AuthorizationRequestViewController___iPhone_4_@2x.png b/MyWeightTests/ReferenceImages/AuthorizationRequestViewControllerTests/AuthorizationRequestViewController___iPhone_4_@2x.png index e7ce0a3..103b58d 100644 Binary files a/MyWeightTests/ReferenceImages/AuthorizationRequestViewControllerTests/AuthorizationRequestViewController___iPhone_4_@2x.png and b/MyWeightTests/ReferenceImages/AuthorizationRequestViewControllerTests/AuthorizationRequestViewController___iPhone_4_@2x.png differ diff --git a/MyWeightTests/ReferenceImages/AuthorizationRequestViewControllerTests/AuthorizationRequestViewController___iPhone_5_5_@2x.png b/MyWeightTests/ReferenceImages/AuthorizationRequestViewControllerTests/AuthorizationRequestViewController___iPhone_5_5_@2x.png index a6f104b..745b9ad 100644 Binary files a/MyWeightTests/ReferenceImages/AuthorizationRequestViewControllerTests/AuthorizationRequestViewController___iPhone_5_5_@2x.png and b/MyWeightTests/ReferenceImages/AuthorizationRequestViewControllerTests/AuthorizationRequestViewController___iPhone_5_5_@2x.png differ