Rotate the pin image on the swipe action

This commit is contained in:
Jackson Harper 2023-07-06 16:41:55 -07:00
parent 982349cef2
commit e2d4de1f41
12 changed files with 89 additions and 2 deletions

View file

@ -545,8 +545,7 @@ struct AnimatingCellHeight: AnimatableModifier {
viewModel.pinItem(dataService: dataService, item: item)
}, label: {
VStack {
Image(systemName: "pin.fill")
.rotationEffect(Angle(degrees: 180))
Image.pinRotated
Text("Pin")
}
}).tint(Color(hex: "#0A84FF")))

View file

@ -14,4 +14,6 @@ public extension Image {
static var tabSubscriptions: Image { Image("_tab_subscriptions", bundle: .module).renderingMode(.template) }
static var tabLibrary: Image { Image("_tab_library", bundle: .module).renderingMode(.template) }
static var tabHighlights: Image { Image("_tab_highlights", bundle: .module).renderingMode(.template) }
static var pinRotated: Image { Image("pin-rotated", bundle: .module) }
}

View file

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "HighlighterCircle.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

View file

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "BookOpen.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

View file

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "BookmarksSimple.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View file

@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "pin.fill 1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "pin.fill.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "pin.fill 2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B