This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###### CONSISTENCY BETWEEN MACOS AND IOS ##### | |
# | |
# In order to use the same PodFile with MacOS, we need to unlink the libraries that do not support Catalyst, filter | |
# files in native targets build phases, filter dependencies and make sure the unsupported frameworks along with their | |
# their bundle resources are not included in the final archive. For that, we use `platform_filter` to specify 'ios' and | |
# 'OTHER_LDFLAGS[sdk=iphone*]' to link those libraries for iPhone and iPad. Besides, we modify "*frameworks.sh" and | |
# "*resrouces.sh" to skip installation for architecture x86_64. | |
# | |
# *Notice*: 'sdk=iphone*' excludes macOS, even though Catalyst is compiled with iOS SDK. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CardView(card: card) | |
// ... | |
.gesture(DragGesture() | |
.onChanged({ (value) in | |
// some code | |
}).onEnded({ (value) in | |
// some code | |
})) | |
.transition(.moveUpWardsWhileFadingIn) | |
.disabled(!self.wallet.isFirst(card: card)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CardView(card: card) | |
.opacity(self.opacity(for: card)) | |
.offset(x: 0, | |
y: self.offset(for: card)) | |
.scaleEffect(self.scaleEffect(for: card)) | |
.rotation3DEffect(self.rotationAngle(for: card), | |
axis: (x: 0.5, y: 1, z: 0)) | |
// 1 | |
.transition(.moveUpWardsWhileFadingIn) | |
// 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZStack() { | |
if self.isPresented { | |
ForEach(self.wallet.cards) { card in | |
CardView(card: card) | |
/* | |
... Setting up the view ... | |
*/ | |
} | |
} | |
}.padding(.horizontal, Self.padding) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZStack() { | |
ForEach(self.wallet.cards) { card in | |
CardView(card: card) | |
.opacity(self.opacity(for: card)) | |
.offset(x: 0, | |
y: self.offset(for: card)) | |
.scaleEffect(self.scaleEffect(for: card)) | |
.rotation3DEffect(self.rotationAngle(for: card), | |
axis: (x: 0.5, y: 1, z: 0)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Initializes a new Show Case View. | |
- Parameter target: The bar button that's targeted and whose feature is intended to be exaplained | |
- Parameter label: *Optional*, an identifier for the show case | |
- Remark: From iOS 11 onwards, the target must be a custom bar button item, that is, it must have been created by using *init(customView: UIView?)* constructor. If not so, it'll return *nil* | |
- Note: The show case arrow direction will always point upwards | |
*/ |