Skip to content

Commit

Permalink
Polish animations for star / add to list buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimillian committed May 24, 2020
1 parent c39efae commit ac289d8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions ACHNBrowserUI/ACHNBrowserUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@
CODE_SIGN_ENTITLEMENTS = ACHNBrowserUI/ACHNBrowserUI.entitlements;
CODE_SIGN_IDENTITY = "Apple Development: Thomas Ricouard (7MB55D6BJ5)";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 052532020;
CURRENT_PROJECT_VERSION = 052542020;
DEVELOPMENT_ASSET_PATHS = "\"ACHNBrowserUI/Preview Content\"";
DEVELOPMENT_TEAM = Z6P74P6T99;
ENABLE_PREVIEWS = YES;
Expand All @@ -1175,7 +1175,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.4.4;
MARKETING_VERSION = 1.4.5;
PRODUCT_BUNDLE_IDENTIFIER = com.thomasricouard.ACNH;
PRODUCT_NAME = "AC Helper";
PROVISIONING_PROFILE_SPECIFIER = "AC Dev";
Expand All @@ -1196,7 +1196,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 052532020;
CURRENT_PROJECT_VERSION = 052542020;
DEVELOPMENT_ASSET_PATHS = "\"ACHNBrowserUI/Preview Content\"";
DEVELOPMENT_TEAM = Z6P74P6T99;
ENABLE_PREVIEWS = YES;
Expand All @@ -1206,7 +1206,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.4.4;
MARKETING_VERSION = 1.4.5;
PRODUCT_BUNDLE_IDENTIFIER = com.thomasricouard.ACNH;
PRODUCT_NAME = "AC Helper";
PROVISIONING_PROFILE_SPECIFIER = "AC Dev";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ extension ItemDetailView {
Image(systemName: list.items.contains(self.itemViewModel.item) ? "checkmark.seal.fill": "checkmark.seal")
.foregroundColor(list.items.contains(self.itemViewModel.item) ? Color.acTabBarBackground : Color.acText)
.scaleEffect(list.items.contains(self.itemViewModel.item) ? 1.2 : 0.9)
.animation(.spring())
.animation(.spring(response: 0.5, dampingFraction: 0.3, blendDuration: 0.5))
UserListRow(list: list)
}.onTapGesture {
if let index = list.items.firstIndex(of: self.itemViewModel.item) {
Expand Down
5 changes: 3 additions & 2 deletions ACHNBrowserUI/ACHNBrowserUI/views/shared/LikeButtonView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ struct LikeButtonView: View {
}) {
Image(systemName: imageName).foregroundColor(color)
}
.scaleEffect(self.isInCollection ? 1.2 : 1.0)
.scaleEffect(self.isInCollection ? 1.3 : 1.0)
.buttonStyle(BorderlessButtonStyle())
.animation(.interactiveSpring())
.animation(.spring(response: 0.5, dampingFraction: 0.3, blendDuration: 0.5))
}
}

struct StarButtonView_Previews: PreviewProvider {
static var previews: some View {
LikeButtonView(item: static_item)
.environmentObject(UserCollection.shared)
}
}

0 comments on commit ac289d8

Please sign in to comment.