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
| var body: some View { | |
| ZStack { | |
| Color.blue.opacity(0.5) | |
| .ignoresSafeArea() //to ignore safe area | |
| HStack(spacing: 10) { | |
| Image(systemName: "swift") | |
| .resizable() | |
| .scaledToFit() | |
| .frame(width: 100, height: 100, alignment: .center) | |
| VStack(spacing: 10) { |
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
| var body: some View { | |
| ZStack { | |
| Image(systemName: "bubble.left").resizable().frame(width: 200.0, height: 200.0) | |
| Text("ZStack") | |
| } | |
| } |
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
| var body: some View { | |
| HStack(spacing: 10) { | |
| Text("VStack") | |
| Text("HStack") | |
| Text("ZStack") | |
| } | |
| } |
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
| var body: some View { | |
| VStack(spacing: 10) { | |
| Text("VStack") | |
| Text("HStack") | |
| Text("ZStack") | |
| } | |
| } |
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
| struct DataType: Identifiable { | |
| let id : Int | |
| let name : String | |
| let size : String | |
| let color : Color | |
| } | |
| var dataTypeList = [ | |
| DataType(id: 0,name: "Integer", size: "4 bytes", color: .red), | |
| DataType(id: 1,name: "Integer", size: "1 byte", color: .blue), |
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
| var body: some View { | |
| List(dataTypeList, id: \.name) { dataType in | |
| HStack { | |
| Text(dataType.name) | |
| Text(dataType.size).foregroundColor(dataType.color) | |
| } | |
| } | |
| } | |
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
| let dataTypesArray = ["Integer", "String", "Float", "Double"] | |
| var body: some View { | |
| List { | |
| ForEach(0..<dataTypesArray.count) { each in | |
| Text(dataTypesArray[each]) | |
| } | |
| } | |
| } |
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
| var body: some View { | |
| List { | |
| ForEach(0..<5) { _ in | |
| Text("Integer") | |
| } | |
| } | |
| } |
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
| var body: some View { | |
| List { | |
| Text("Integer") | |
| Text("String") | |
| Text("Float") | |
| } | |
| } |
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
| func convertDataToImages(imageDataArray: [Data]) -> [UIImage] { | |
| var myImagesArray = [UIImage]() | |
| imageDataArray.forEach { (imageData) in | |
| myImagesArray.append(UIImage(data: imagedata)) | |
| } | |
| return myImagesArray | |
| } |
NewerOlder