Last active
November 24, 2019 05:06
-
-
Save rudrankriyam/a7222e1e4b25b0d8a72997a45e0e796d to your computer and use it in GitHub Desktop.
Creating an Apple like Splash Screen in SwiftUI Information Detail 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
| import SwiftUI | |
| struct InformationDetailView: View { | |
| var title: String = "title" | |
| var subTitle: String = "subTitle" | |
| var imageName: String = "car" | |
| var body: some View { | |
| HStack(alignment: .center) { | |
| Image(systemName: imageName) | |
| .font(.largeTitle) | |
| .foregroundColor(.mainColor) | |
| .padding() | |
| .accessibility(hidden: true) | |
| VStack(alignment: .leading) { | |
| Text(title) | |
| .font(.headline) | |
| .foregroundColor(.primary) | |
| .accessibility(addTraits: .isHeader) | |
| Text(subTitle) | |
| .font(.body) | |
| .foregroundColor(.secondary) | |
| .fixedSize(horizontal: false, vertical: true) | |
| } | |
| } | |
| .padding(.top) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment