In this lab, students will learn the essentials of SwiftUI and work with text, images, and buttons. They will also explore the SwiftUI layout system and learn to use VStack, HStack, and ZStack for organizing views in their app design.
Instructions:
Create a new Swift playground or Xcode project to complete the lab tasks.
Follow the step-by-step instructions for each task below.
Write your code in a clear and organized manner, following best practices.
Requirements:
Xcode (latest version)
Basic knowledge of Swift syntax and variables
Tasks:
Task 1: Introduction to SwiftUI
Create a new SwiftUI View and display a simple text message using the Text view.
Customize the text font, color, and alignment to enhance the appearance.
Task 2: Working with Images
Add an image to the SwiftUI View using the Image view.
Experiment with different image resizing options and aspect ratios.
Task 3: Creating Buttons
Implement a button in the SwiftUI View using the Button view.
Attach an action to the button to display an alert or perform a simple task.
Task 4: VStack Layout
Create a VStack to arrange multiple views vertically in the SwiftUI View.
Place text, images, and buttons within the VStack and observe the layout changes.
Task 5: HStack Layout
Implement an HStack to arrange multiple views horizontally in the SwiftUI View.
Combine text, images, and buttons within the HStack to create an interactive layout.
Task 6: ZStack Layout
Use a ZStack to overlap and layer multiple views in the SwiftUI View.
Arrange text and images within the ZStack to create a visually appealing design.
Submission Guidelines:
Create new repository name it as "iOS-Developemnt-Bootcamp-July-2023-Week-2-Day-1-Lab".
Upload your project files to the repo you just created.
Submit your project repo link as comment down below.
Grading Criteria:
Your lab assignment will be graded based on the following criteria:
Correctness and completion of tasks (50%)
Code quality, readability, and adherence to best practices (30%)
Creativity and utilization of SwiftUI features (20%)
Additional Notes:
You may ask the lab instructor for assistance during lab hours.
Avoid plagiarism; write the code yourself.
Late submissions will not be accepted without prior approval.
Deadline:
Submit your completed lab assignment prior start of next session.
Objective:
In this lab, students will learn the essentials of SwiftUI and work with text, images, and buttons. They will also explore the SwiftUI layout system and learn to use VStack, HStack, and ZStack for organizing views in their app design.
Instructions:
Requirements:
Tasks:
Task 1: Introduction to SwiftUI
Text
view.Task 2: Working with Images
Image
view.Task 3: Creating Buttons
Button
view.Task 4: VStack Layout
Task 5: HStack Layout
Task 6: ZStack Layout
Submission Guidelines:
Grading Criteria:
Your lab assignment will be graded based on the following criteria:
Additional Notes:
Deadline:
Submit your completed lab assignment prior start of next session.