In this module, you'll be building the UI for an app to rate movies using SwiftUI. The functionality has been provided for you.
- Build nested views by decomposing the different layers into subviews.
- Implement UI components based on provided designs.
- Learn basic methods of navigation, such as a “sheet.”
MoviesView.swift
RatingsView.swift
RatingCardView.swift
Movie.swift
- Relevant images in
Assets.xcassets
- Refer to the
UI_Screenshots
folder for design references. - Follow the design as precisely as possible.
- Pay attention to green annotations for functionality and design features.
- Use icons from Apple's "SF Symbols" application.
- Clone the repo to your local device.
- Refer to the Assignments notion page for detailed steps.
- Build the project via Xcode (
Cmd + B
) to ensure everything loads properly.- If previews don't work, run the app in the simulator.
- Create the main interface for rating movies.
- Implement functionality for submitting ratings and navigating to other views.
-
Instance Variables
- Declare and initialize instance variables as needed.
-
Frontend
- Using the app screenshots as a guide, recreate the UI of
MoviesView
within thebody
variable.- Implement star rating feature such that clicking on a star fills it and all preceding stars with yellow.
- Add a "Submit Rating" button to submit the rating and review.
- Add a "Skip" button to move to the next movie without submitting a rating or review.
- Add a button to navigate to
RatingsView
using a popover (leave the action empty for now). - Integrate a custom popcorn icon found online.
- Using the app screenshots as a guide, recreate the UI of
-
Mockup of Screen
- Display individual movie ratings.
- Style rating cards to match design requirements.
-
Instance Variables
- Declare instance variables as needed.
-
Frontend
- Using the app screenshots as a guide, recreate the UI of a rating card.
- Display the movie title.
- Display the star rating.
- Display the review text.
- Style the card to match the design.
- Using the app screenshots as a guide, recreate the UI of a rating card.
-
Mockup of Screen
- Create a view to display all submitted ratings.
- Ensure smooth navigation and layout of rating cards.
-
Frontend
- Using the app screenshots as a guide, recreate the UI of
RatingsView
.- Instantiate a
RatingCardView
for each rating. - Layout the rating cards in a scrollable list.
- Ensure the design matches the provided screenshots.
- Instantiate a
- Using the app screenshots as a guide, recreate the UI of
-
Mockup of Screen
- Implement navigation features within the app.
- Ensure data is correctly passed between views.
- Sheet Navigation
- Set up a sheet navigation to
RatingsView
upon clicking the RatingsView button. - Pass the appropriate data to
RatingsView
.
- Set up a sheet navigation to
Run the app in the simulator to test the UI.
- Built nested views by decomposing the different layers into subviews.
- Implemented UI components based on provided designs.
- Learned basic methods of navigation, such as a “sheet.”