Skip to content

Commit

Permalink
UI tweaks for release (#92)
Browse files Browse the repository at this point in the history
* Decreased animation duration

* Added easy in/out for ModalTransition

* Changed profile action to use debug configuration

* Bumped build version

* Changed texts

* Fixed layout in Add screen for big screens

* Updated screenshots of tests
  • Loading branch information
diogot authored Nov 27, 2016
1 parent 3538335 commit b674e33
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
Expand Down
6 changes: 3 additions & 3 deletions MyWeight/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleDisplayName</key>
<string>MyWeight</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>5</string>
<string>6</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
Expand Down
4 changes: 2 additions & 2 deletions MyWeight/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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";

Expand Down
4 changes: 2 additions & 2 deletions MyWeight/Resources/pt-BR.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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";

Expand Down
12 changes: 10 additions & 2 deletions MyWeight/Screens/Add/AddView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
6 changes: 5 additions & 1 deletion MyWeight/Transitions/ModalTransition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ UIViewControllerAnimatedTransitioning {

func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval
{
return style.animationTime
return style.animationDuration
}

func animateTransition(using transitionContext: UIViewControllerContextTransitioning)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions MyWeight/Views/Style.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public protocol StyleProvider {

var grid: CGFloat { get }

var animationTime: TimeInterval { get }
var animationDuration: TimeInterval { get }
}

public struct Style: StyleProvider {
Expand All @@ -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)
Expand Down
Binary file modified ...sDeniedViewControllerTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...essDeniedViewControllerTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...sDeniedViewControllerTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...uestViewControllerTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...equestViewControllerTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...uestViewControllerTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b674e33

Please sign in to comment.