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
export type BaseCountry = { | |
// the ISO 3166-1 code for the country | |
code: string | |
// the name of the country (in english) | |
name: string | |
// the raw emoji for the country's flag (can be multiple codepoints) | |
emoji: string | |
// the international dialing code for the country (without the `+` prefix or escape codes) | |
dial_country_code: string | |
// the regions codes, if any |
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
struct DraggablePita: View { | |
var body: some View { | |
Image(uiImage: UIImage(named: "pita.png")!) | |
.draggable() // Add the new, custom modifier to make this draggable | |
} | |
} | |
// Handle dragging | |
struct DraggableView: ViewModifier { | |
@State var offset = CGPoint(x: 0, y: 0) |