Explore the art and science of app design. Discuss user interface (UI) design principles, user experience (UX) best practices, and share design resources and inspiration.

All subtopics

Post

Replies

Boosts

Views

Activity

Picker and DatePicker selection confusion
I have a multi view app I am trying to develop as my first app. I have gone through much of HackingwithSwiftui Xcode 16.1 SwiftUI on a MacAir The prior views in the app store various information. golf Course info in one and Golfers info in another. This third view is to record rounds of golf played. I started it simple with me entering input manually and that worked. I then decided to start using pickers with the first two being a DatePicker and the second pulling in the nickname(Handle) for players to select from. in a Handle Picker. Following is my code. I can select a date as of Now and prior for date played and also the second picker does pull in the all the Handles from my prior view and I can select a Handle of the player for the round. I then fill in all the other information. When I exit the view I do see that the Round is created but the Date always defaults to Now and the Handle stays blank. When i go back in to edit the round I can change the date and select a Handle but can get them to save. I have tried many things and searched for days on the web for examples with no luck. I am sure its something simple. Any help is appreciated as I want to add for pickers for course, tee and other fields. But until I figure out what I am missing the project is at a standstill. import SwiftUI import SwiftData struct RoundsEditDataView: View { @Bindable var roundsdata: RoundsData @Environment(.modelContext) private var modelContext @State private var playDate = Date.now @Query(sort: \PlayerData.playerHandle) private var players: [PlayerData] @State private var selectedHandle: PlayerData? = nil var body: some View { Form { HStack { Text("Course:") TextField("Course Name", text: $roundsdata.roundscourseName) .textContentType(.name) } HStack { DatePicker("Date:", selection: $playDate, in: ...Date(), displayedComponents: .date) } Section { Picker("Handle:", selection: $selectedHandle) { Text("Select a Handle").tag(nil as PlayerData?) ForEach(players, id: \.self) { player in HStack { Text(player.playerHandle) .frame(maxWidth: .infinity, alignment: .leading) .tag(player as PlayerData?) } .frame(maxWidth: .infinity, alignment: .leading) .tag(player as PlayerData?) } } // .pickerStyle(.inline) this does not fix issue or design wise work } The rest of this works fine for now until I decide to convert more to picker lists. HStack { Text("Tee:") TextField("Tee", text: $roundsdata.roundsTee) .textContentType(.name) } HStack { Text("Handicap:") TextField("Handicap", value: $roundsdata.roundsHandicap, format: .number) .textContentType(.name) } HStack { Text("*****:") TextField("*****", value: $roundsdata.roundsGross, format: .number) } HStack { Text("Net:") TextField("Net", value: $roundsdata.roundsNet, format: .number) .textContentType(.name) } HStack { Text("Rating:") TextField("Rating", value: $roundsdata.roundsRating, format: .number) .textContentType(.name) } HStack { Text("Slope:") TextField("Slope", value: $roundsdata.roundsSlope, format: .number) .textContentType(.name) } } } }
2
0
351
Nov ’24
Photos album is chaotic
This is my first day with IOS 18.1.1 and so far it’s smooth. my only problem is how chaotic the photos app has become during the update. For one, i dont like how to access any of the organization it’s at the way bottom and even after customizing and reorganizing there’s no way to to move that section to the top. i also dont like how all my photos are just out on front street when the app is launched, it makes everything hard to look at and hard to find. please fix this and make browsing photos enjoyable again.
1
0
325
Nov ’24
3d Color Profile Crash (Cinema 4d + Redshift)
Hello friends, We are about to launch new app where we want to implement 3d animations that we designed in Cinema 4d and rendered it in Redshift render engine. We worked with sRGB color profile and ACEScg colors profile which both works fine and display correct on Windows machines, but we got to the point where nothing is correct on Apple devices – simply we lost our colors, apple devices displays our 3d animation in a wrong way, since windows works fine. Does anyone know the best workflow from Cinema 4d + Redshift + After Effects to match same colors on both systems and everywhere? We already tried youtube, adobe support, exporting it in EXR, PNG, JPG, LINEAR, TIFF, MP4 etc. – Importing it to After effects with sRGB workflow and ACEScg – it doesnt't work on Macbook, ipad, iphone etc. Please help CHRIS
0
0
301
Nov ’24
IOS 18 Update - Emoji Keyboard
I don't typically write reviews on new updates as they typically are fine. For once I did want to mention one thing that bothers me and hoping it can be changed. I greatly dislike the new emoji keyboard and how its become bigger. I don't like the large keyboard layout and they kind of hurt my eyes. I'm near sighted and so its not needed for me to have them so big. Is there a way to revert them to the previous version? I don't know if anyone else has the same thoughts on this subject. Maybe a possible option to have the ability to switch the keyboard size to which ever suits the user? Anything would be helpful as I do enjoy using the emojis but now I'm avoiding them. Thank you for your time and consideration.
8
7
3.6k
Nov ’24
NavigationStack Fatal error: ‘try!
I am struggling to get pickers work in a form. I add NavigationStack and get this error Fatal error: 'try!' expression unexpectedly raised an error: SwiftUI.AnyNavigationPath.Error.comparisonTypeMismatch I have tried most every format or picker setup as well as DatePicker and can’t seem to determine how to get the selected item in a picker list saved. running: Xcode 16.1 import SwiftUI import SwiftData struct RoundsEditView: View { @Bindable var roundsdata: RoundsData @Environment(.modelContext) private var modelContext // @Environment(.dismiss) var dismiss @State private var playDate = Date.now @State private var selectedTee = "Gold" let tees = ["Black", "Blue", "White", "Gold", "Red", "Silver"] @Query(sort: \PlayerData.playerHandle) private var players: [PlayerData] @State private var selectedHandle: PlayerData? = nil var body: some View { NavigationStack { Form { HStack { Text("Course:") TextField("Course Name", text: $roundsdata.roundscourseName) .textContentType(.name) } HStack { // DatePicker("Date:", selection: $playDate, in: ...Date(), DatePicker("Date:", selection: $playDate, displayedComponents: [.date]) // DatePicker("Date:", selection: $playDate, in: ...Date(), // displayedComponents: .date).onChange(of: playDate) { oldState, newState in model.youDidChangeMethod(from: oldState, to: newState) } Section { Picker("Handle:", selection: $selectedHandle) { Text("Select a Handle").tag(nil as PlayerData?) ForEach(players, id: \.self) { player in HStack { Text(player.playerHandle) .frame(maxWidth: .infinity, alignment: .leading) .tag(player as PlayerData?) } .frame(maxWidth: .infinity, alignment: .leading) .tag(player as PlayerData?) } } // .pickerStyle(.inline) this does not fix issue or design wise work } // HStack { // Text("Tee:") // TextField("Tee", text: $roundsdata.roundsTee) // .textContentType(.name) // } HStack { Picker("Tee:", selection: $selectedTee) { ForEach(tees, id: \.self) { Text($0) } } } HStack { Text("Handicap:") TextField("Handicap", value: $roundsdata.roundsHandicap, format: .number) .textContentType(.name) } HStack { Text("*****:") TextField("*****", value: $roundsdata.roundsGross, format: .number) } HStack { Text("Net:") TextField("Net", value: $roundsdata.roundsNet, format: .number) .textContentType(.name) } HStack { Text("Rating:") TextField("Rating", value: $roundsdata.roundsRating, format: .number) .textContentType(.name) } HStack { Text("Slope:") TextField("Slope", value: $roundsdata.roundsSlope, format: .number) .textContentType(.name) } } .navigationTitle("Edit Rounds") } } }
10
0
732
Nov ’24
Clarification on ATT Dialog and Displaying Ads in iOS App
Hello everyone, I have recently published my app on the App Store and am planning to implement ads. I have a couple of questions regarding Apple's App Tracking Transparency (ATT) framework and best practices for integrating ads. ATT Dialog and Showing Ads: If a user selects "Ask App Not to Track" on the ATT dialog, am I still allowed to show ads in my app? I understand that ATT restricts tracking for personalized ads, but does this mean I cannot show any ads at all, or is it just the personalized (targeted) ads that are restricted? Best Practices for Implementing Native Ads: I want to integrate native ads into my app. Could you share any best practices or guidelines for integrating native ads in a way that provides a good user experience and complies with Apple's policies? I’m especially interested in how to implement them in a non-intrusive way and what ad networks are best for this type of integration. Thanks for your help!
0
0
405
Nov ’24
Idea for iOS 19
Hey! So tell me guys, in iOS 19, i think it would be a great idea to make a nostalgic mode or “old” mode of iOS! Like iOS 1, slide to unlock was really cool for me. It would change the icons, like with the YouTube app for example. If you had the app, it could change to the very old icon, and the app interface maybe can possibly change. This was all i had in mind, but if you wanna comment on here and give more ideas, feel free!
1
0
425
Nov ’24
Emoji Keyboard size is large after updating to iOS 18.1
Emoji keyboard are way too big after updating to IOS 18.1 so anoying to use emojis now. I really don't like using emojis anymore. I really hope they are going to fix this quickly. I use my phone for work and pleasure. I don't needing my heart to be bigger or different colors to every reaction. Please bring back the smaller emoji keyboard or add a setting to switch it back. This is really annoying.
2
2
948
Dec ’24
How to use FreePascal with my iMac 27” Intel
I would like to use FreePascal with my iMac 27” - late 2015 - CPU: 3.2 GHz Intel Core i5 quad-core - macOS Monterey 12.7.6. I can't figure out what I need to do to install XCode11 and how I can get the compiler to work. Can anyone help me? Thanks! Vorrei usare FreePascal con il mio iMac 27” - late 2015 - CPU: 3,2 GHz Intel Core i5 quad-core - macOS Monterey 12.7.6. Non riesco a capire cosa devo fare per installare XCode11 e come posso fare per far funzionare il compilatore. Qualcuno può aiutarmi? Grazie!
2
0
344
Dec ’24
hate the new update
The new photos update is just messy, there was no reason to make changes to it, I also noticed it makes the videos lower quality for some reason. Also I sont understand why emojis were made bigger, looks very tacky now. I wish my phone never automatically updated to this..
1
0
341
Dec ’24
Picker list based on a selection from another Picker list
I have come quite far with my first app and have various picker lists working well. However, I am stuck thinking through how to do this next picker. My data model has Golf Course name and Tee. For each golf course there are multiple Tees and not all the same across the Courses. Example of Data CourseA RedTee CourseA GreenTee CourseA BlueTee CouseB RedTee CourseB YellowTee CourseB WhiteTee I first give the client the ability to Pick a Course from a picker list. That works fine. Now I want to create a Picker list of Tees but only for that selected Course. So if the client selected CourseB they would be presented with these Tees to select from RedTee YellowTee WhiteTee How do I limit the second picker to only show the Tees for the selected Course? Then in an associated question, once i have the Course and the Tee, I want to Auto fill the rest of a form with Slope, Rating and Yardage. @Model class ScorecardData { var scorecardcourseName: String var scorecardTee: String var scorecardSlope: Double var scorecardRating: Double var scorecardYardage: Int Here is my code for the Course Picker List Picker("", selection: $selectedCourse) { Text("Select a Course").tag(" ") ForEach(courses, id: \.self) { course in Text(course.courseName) .tag(course.courseName) } } .onChange(of: selectedCourse) { if(selectedCourse != nil) { roundsdata.roundscourseName = selectedCourse! } } Here is my current Picker list but its pulling all Tees for all Courses Picker("", selection: $selectedTee) { Text("Select Tee").tag(" ") ForEach (tees, id: \.self) { tee in Text(tee.scorecardTee) .tag(tee.scorecardTee) } } .onChange(of: selectedTee) { if(selectedTee != nil) { roundsdata.roundsTee = selectedTee! } } My @State and @Query statements are as follows in case there is a change there that is needed as well, @State private var selectedTee: String? = "Select Tee" @Query(sort: \ScorecardData.scorecardcourseName) private var tees: [ScorecardData] @State private var selectedCourse: String? = "Select Course" @Query(sort: \CourseData.courseName) private var courses: [CourseData]
3
0
340
Dec ’24
Need Help with Guideline 4.2 - Minimum Functionality
I recently got feedback for my app under Guideline 4.2 - Design - Minimum Functionality, and I’m a bit confused. Apple mentioned that the app isn’t “app-like” enough and doesn’t provide sufficient entertainment value or utility. However, I genuinely think my app is unique compared to others on the market. Most similar apps only offer basic features like scorekeeping and saving the game. My app goes beyond that by tracking detailed statistics based on the types of scores achieved during the game. At the end, there’s even a Player Ratings section, which enhances competition and makes the experience more fun for players. Additionally, in today’s gaming scene, many groups play the traditional 101 game with a reward and penalty system. My app uniquely incorporates a reward system, something no other app in the market currently offers. I believe my app has the potential to stand out and meet the needs of a wide audience. Has anyone faced similar feedback? Or does anyone have suggestions on how I could better address this issue? Thanks in advance! 😊
0
0
355
Dec ’24
Navigation Bar appears without having an Navigation View
For a school Project im making a iOS app that displays vending machines on a Map. My problem is that there is this huge navigation bar on top of the screen without even having a navigation view anywhere in the code. In the preview the bar is not shown, but when I upload the app to my phone or run it in the simulator the bar is there.
1
0
366
Dec ’24