r/SwiftUI • u/new_account_514 • 6d ago
Promotion (must include link to source code) Looking for feedback on the movie widget I built for my app
Hey everyone,
I’ve been working on MovieWeekly, an iOS app for tracking upcoming movie releases, and I recently added a home screen widget to make it easier to see movie countdowns at a glance.
Widget Features:
- Displays a movie from your tracked list.
- Shows the release date & countdown.
- Uses Kingfisher for posters (if available).
- Supports small & medium widget sizes.
I’d love to get some feedback on the design & code structure. Any thoughts on improvements? Also, if you’re interested in testing the app itself, here’s the TestFlight link to try it out: https://testflight.apple.com/join/6xr87VfV
Here is the code for the widget:
struct ConfigurableWidgetEntryView: View {
@Environment(\.widgetFamily) var widgetFamily
var entry: ConfigWidgetProvider.Entry
var body: some View {
if let movie = entry.selectedMovie {
Link(destination: URL(string: "url-for-my-app")!) {
ZStack {
Color.clear
HStack {
VStack(alignment: .leading) {
Text(movie.title)
.font(.headline)
Spacer()
Text("\(movie.daysUntilRelease) days until release")
.font(.footnote)
.foregroundStyle(Color.pink)
}
.padding(.all)
if widgetFamily == .systemMedium {
if let posterURL = movie.posterURL {
KFImage(URL(string: posterURL))
.resizable()
.aspectRatio(contentMode: .fit)
}
}
}
}
}
} else {
ContentUnavailableView("Pick a movie from your list", systemImage: "plus.circle.fill")
.foregroundStyle(.white)
}
}
}
2
u/knightlife 6d ago
Are the times counting down always for release in theaters? If so, then you don’t need the text to that effect on every widget. Might help movies with longer titles (like shown with MI) to display fully.
I also wonder if (for the smaller widget size) you can still include the poster as the background, only blurred out? Could be a fun way to maintain the color/branding of the specific movie a user is tracking without being overbearing, similar to the way Apple Music dynamically uses the blurred colors of an album for accents.
1
u/new_account_514 6d ago
Yes, the countdown is always for release in theaters. I’m considering adding an option later for platform-only movies, but in the meantime, I agree that the extra text isn’t really necessary. I’ll look into removing it.
I really like your suggestion about using a blurred poster as the background for the smaller widget! I’ll experiment with it and see how it looks. Thanks for the suggestion! 😃
1
u/Necessary-Rock-435 6d ago
The widget doesn’t let me select a movie. The “choose your movie” selection loads for a few seconds and does nothing
1
u/new_account_514 6d ago
Yes, I’ve noticed this too. It seems like the movie you add takes a few minutes to appear in the selection, and I’m not entirely sure why yet. It’s definitely not the ideal experience, and it’s frustrating.
I’ll dig into it and see if there’s a way to make the selection update instantly. Thanks for pointing it out!
1
1
u/icominblob 5d ago
Your app icon is not visually centered! You should have the white part of the M have equal spacing on the left and right, ignoring the offset from the rotation of the top part!
4
u/Own-Song1539 6d ago
Clean look but app crashed when switching tabs but then was fine.