This file contains hidden or 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
| // Safely Modifying The View State (SwiftUI) | |
| // https://swiftui-lab.com | |
| // https://swiftui-lab.com/state-changes | |
| import SwiftUI | |
| struct CustomView: View { | |
| var body: some View { | |
| NavigationView { |
This file contains hidden or 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
| //------------------------------------------------------------------------ | |
| // Author: The SwiftUI Lab | |
| // Post: Advanced SwiftUI Animations - Part 4 | |
| // Link: https://swiftui-lab.com/swiftui-animations-part4 (TimelineView) | |
| // | |
| import SwiftUI | |
| struct ContentView: View { | |
| var body: some View { |
This file contains hidden or 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
| // Author: SwiftUI-Lab (www.swiftui-lab.com) | |
| // Description: This code is part of the "Advanced SwiftUI Animations - Part 5" | |
| // Article: https://swiftui-lab.com/swiftui-animations-part5/ | |
| import SwiftUI | |
| struct ContentView: View { | |
| var body: some View { | |
| ClockView() | |
| .background(.gray) |
This file contains hidden or 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
| import SwiftUI | |
| struct DropdownOption: Hashable { | |
| let key: String | |
| let value: String | |
| public static func == (lhs: DropdownOption, rhs: DropdownOption) -> Bool { | |
| return lhs.key == rhs.key | |
| } | |
| } |
This file contains hidden or 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
| public static void SetAppearance() | |
| { | |
| if (Util.IsIOS5OrBetter) | |
| { | |
| UINavigationBar.Appearance.SetBackgroundImage( | |
| Resources.NavBarHeaderBackground, | |
| UIBarMetrics.Default); | |
| UIBarButtonItem.Appearance.SetBackgroundImage( | |
| Resources.BarButtonNormal.CreateResizableImage(new UIEdgeInsets(0,5,0,5)), |