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.

Learn about designing great app and game experiences

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

List View within a Scrollview
The bane of my existence has been designing interfaces where the whole view needs to scroll, but a portion is a List and the other portion is static. I run into this problem time and again so I was hoping someone has a good solution because we all know that embedding a List view inside ScrollView is a no-go within SwiftUI. It simply doesn't work. So what is a best practice when you need the whole screen to scroll, but a portion is a List? Use a navigation stack instead of a ScrollView? What if it's a child view of a navigation stack already?
Topic: Design SubTopic: General Tags:
2
0
759
Jul ’25
Proposal: Capacitive swipe-based volume control integrated into iPhone frame
I would like to propose a design enhancement for future iPhone models: using the existing bottom-right antenna line (next to the power button area) as a capacitive “volume control zone” that supports swipe gestures. Today this line is a structural antenna break, but it is also located exactly where the thumb naturally rests when holding the phone in one hand. With a small embedded capacitive/force sensor, the user could slide their finger along this zone to control volume without reaching for the physical buttons. Why this makes sense: • Perfect ergonomic thumb position in both portrait and landscape • One-handed volume adjustment becomes easier for large-screen devices • Silent and frictionless vs. clicking buttons (useful in meetings / night mode) • Consistent with Apple’s recent move toward contextual hardware input (Action Button, Capture Button, Vision Pro gestures) The interaction model would be: • Swipe up → increase volume • Swipe down → decrease volume • (Optional) long-press haptic = mute toggle This could also enhance accessibility, especially for users with reduced hand mobility who struggle to press mechanical buttons on tall devices. Technically, this would be similar to the Capture Button (capacitive + pressure layers), but linear instead of pressure-based. It does not replace physical buttons, it complements them as a silent gesture-based alternative. Thank you for considering this as a future interaction refinement for iPhone hardware design.
2
0
527
Oct ’25
How to test iPhone app and CarPlay together?
I have developed a mobile app using SwiftUI. Now I am in the process of building a CarPlay application. I know how to test the CarPlay app using a simulator but here is my confusion, How to test the iPhone app and CarPlay together? I want to test few scenarios like, user login / logout from mobile app. Location enabled /disabled in the mobile app. I know that swiftUI handles the scenes by itself. Kindly help me validate the above scenarios as I am getting black screen on iPhone whenever the CarPlay is launched. Below is the code snippet, func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { if connectingSceneSession.role == .carTemplateApplication { let sceneConfiguration = UISceneConfiguration(name: "CarPlay Scene", sessionRole: connectingSceneSession.role) sceneConfiguration.delegateClass = CarPlaySceneDelegate.self return sceneConfiguration } // Configuration for other types of scenes return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } struct MyApp: App { @UIApplicationDelegateAdaptor(AppDelegate.self) var delegate var body: some Scene { WindowGroup { ContentView() .preferredColorScheme(.light) } } } Info.plist <key>UIApplicationSceneManifest</key> <dict> <key>UIApplicationSupportsMultipleScenes</key> <true/> <key>UISceneConfigurations</key> <dict> <key>CPTemplateApplicationSceneSessionRoleApplication</key> <array> <dict> <key>UISceneConfigurationName</key> <string>CarPlay Scene</string> <key>UISceneDelegateClassName</key> <string>$(PRODUCT_MODULE_NAME).CarPlaySceneDelegate</string> </dict> </array> </dict> </dict>
2
0
603
Jan ’25
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!
Topic: Design SubTopic: General
2
0
452
Dec ’24
i am struggling to get my tab view to work,
i am struggling to get my tab view to work, when i call views in the action part of my tab view, my background creates issue? does anyone know how to fix this? struct ContentView: View { @Environment(.colorScheme) var colorMode let Color1: Color = .cyan var Color2: Color { colorMode == .dark ? .black : .white } var TextColor: Color{ colorMode == .dark ? .black : .black } let tax: Double = 0.0875 var OptionTypes: [String] = ["Breakfeast", "Lunch", "Dinner", "Dessert", "Drinks"] var BreakfeastFoods: [Food] = [ Food(Name: "Eggs Benedict", Price: 9.50), Food(Name: "Avocado Toast", Price: 5.75), Food(Name: "French Toast", Price: 12.50), Food(Name: "Waffles", Price: 7.25), Food(Name: "Pancakes", Price: 8.60) ] var LunchFoods: [Food] = [ Food(Name: "Tuna Salad", Price: 11.25), Food(Name: "Pizza", Price: 22.50), Food(Name: "Chicken Sandwitch", Price: 8.95), Food(Name: "French Fries", Price: 5.15), Food(Name: "Macaroni and Cheese", Price: 7.50) ] var DinnerFoods: [Food] = [ Food(Name: "Ribeye Steak", Price: 18.99), Food(Name: "Pork Ribs", Price: 21.75), Food(Name: "Salmon", Price: 15.00), Food(Name: "Burrito Bowl", Price: 13.99), Food(Name: "Chicken Fajitas", Price: 20.50) ] var DessertFoods: [Food] = [ Food(Name: "Ice Cream Sundae", Price: 10.00), Food(Name: "Fudge Brownie", Price: 4.85), Food(Name: "Chocolate Cake Slice", Price: 6.10), Food(Name: "Pumpkin Pie", Price: 6.10), Food(Name: "Ice Cream Float", Price: 3.50) ] var Drinks: [Food] = [ Food(Name: "Water", Price: 0.00), Food(Name: "Sparkling Water", Price: 2.15), Food(Name: "Soda", Price: 3.00), Food(Name: "Coffee", Price: 2.50), Food(Name: "Hot Chocolate", Price: 3.50) ] @State var MyCart: [Food] = [] var body: some View { NavigationStack{ ZStack{ LinearGradient(colors: [Color1, Color2], startPoint: .top, endPoint: .bottom).ignoresSafeArea() VStack(spacing: 40){ ForEach(OptionTypes, id: \.self){ OptionType in NavigationLink(value: OptionType){ Text(OptionType) }.frame(width: 250, height: 70).background(LinearGradient(colors: [.cyan, .white,.cyan], startPoint: .topLeading, endPoint: .bottom)).foregroundStyle(TextColor).cornerRadius(100).font(.system(size: 25, weight: .medium)).padding(.top, 16) } }.navigationDestination(for: String.self) { OptionType in switch OptionType{ case "Breakfeast": BreakFeastView(BreakfeastList: BreakfeastFoods, Color1: Color1, Color2: Color2) case "Lunch": LunchView(LunchList: LunchFoods, Color1: Color1, Color2: Color2) case "Dinner": DinnerView(DinnerList: DinnerFoods, Color1: Color1, Color2: Color2) case "Dessert": DessertView(DessertList: DessertFoods, Color1: Color1, Color2: Color2) case "Drinks": DrinksView(DrinksList: Drinks, Color1: Color1, Color2: Color2) // case "My Cart": // MyCartView(MyCartList: MyCart, Color1: Color1, Color2: Color2) default: Text("Error") } } } .navigationTitle("Choose Menu") TabView{ Tab("Menu", systemImage: "fork.knife"){ } Tab("My-Cart", systemImage: "cart.fill"){ } Tab("Store Location", systemImage: "mappin"){ } } } } }
Topic: Design SubTopic: General Tags:
2
0
449
Jul ’25
How can I force a function only runs once during the whole app lifecycle?
Hi, I want to generate some sample datas for demonstrating the functions of my app when the app launched. My codes are as followings: func generateSampleData() { let hasLaunchedKey = "HasLaunchedBefore" let defaults = UserDefaults.standard if !defaults.bool(forKey: hasLaunchedKey) { //generate the demo data } defaults.set(true, forKey: hasLaunchedKey) } And I put the func in a view's onAppear modifier. I found every time I go the view, it generates the demo data again, which results in producing a lot of demo data. But I have set the status of the function running in the userdefault. Why did it happen? Best Wishes,
Topic: Design SubTopic: General
2
0
118
Aug ’25
unable to optimize App for iPad
I use swiftui to build apps on iPhone and iPad. There is no problem with the iPhone app. The game display is fully shown on iPhone. However, for the iPad, the game display is not shown and the screen goes black. I had to tap the button on the upper left side.(looks like a side view button) After that, the game display is only shown in the left side in a very small size. How can I make the game display fully shown in the iPad?
2
0
112
Apr ’25
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("Gross:") TextField("Gross", 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) } } } }
Topic: Design SubTopic: General
2
0
487
Dec ’24
Navigation item title compact size with large text iOS26
Hi there. Our designer is designing our app in Figma with the navigation element with compact size navigation bar, and large title. I couldn't find an API to actually configure the nav bar to be compact while keeping the large title enabled. Figma uses the libraries provided by Apple so it's weird I can't find such configuration in iOS26. I'm adding a screenshot of the options in Figma. First option is: Large size & large text. The one our designer is using is compact size & large text.
Topic: Design SubTopic: General Tags:
2
0
1.7k
Sep ’25
Can't get a simple network call working. Novice developer.
Here is my code and the error code being generated during build. let myString : String = "https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=AAPL&apikey= D5GY7HKODE66G0T9" var banjo = URL(string: myString) let task = URLSession.shared.dataTask(with:banjo ) { myDatastring , response , error in} // task.resume() I've tested that URL in my browser and it works. But when I try to build I get: Value of optional type 'URL?' must be unwrapped to a value of type 'URL' Please tell me what I'm doing wrong. I think the URL struct is not returning a URL type of object.
Topic: Design SubTopic: General
2
0
281
Sep ’25
Can't make buttons rectangular!
Ever since Xcode Version 26.0.1 I cannot for the life of me make my buttons rectangular. They are all capsule (or oval) shaped. My interface was designed for square buttons but no matter what I do the issue stays the same. This is what I have (it's fairly barebones but would have worked before I believe): @IBOutlet weak var PagesInterface: UIButton! override func viewDidLoad() { super.viewDidLoad() PagesInterface.layer.cornerRadius = 0 PagesInterface.layer.masksToBounds = true }
2
0
556
Oct ’25
Clarification on UIDesignRequiresCompatibility Key and Liquid Glass Adoption
Dear Apple Developer Relations Team, We are currently reviewing the documentation for the UIDesignRequiresCompatibility Info.plist key. In the documentation, there is a warning that states: "Temporarily use this key while reviewing and refining your app’s UI for the design in the latest SDKs." However, in the adoption guide for Liquid Glass: Adopting Liquid Glass, we did not see any explicit requirement to force adoption of the Liquid Glass design. We have the Gojek app, which currently uses the UIDesignRequiresCompatibility key. To ensure long-term stability, we would like clarification on the following points: Future Support of the Key: Is it safe to continue using the UIDesignRequiresCompatibility key? Can you confirm whether this key will remain supported or if there are plans for it to be deprecated/removed in future iOS versions? Liquid Glass Adoption: Our app’s design guidelines do not align with the Liquid Glass style. Can you confirm that adoption of Liquid Glass is not mandatory, and that apps can continue to use their existing custom design guidelines without any restrictions? Compatibility with iOS 26: Are there any required changes we need to make to our existing views to ensure that the UI will continue to render as it does today on iOS 26 and beyond? We want to make sure we provide the best user experience while remaining compliant with Apple’s guidelines. Your clarification would help us plan our design and development roadmap accordingly. Thank you for your support and guidance.
Topic: Design SubTopic: General Tags:
2
2
668
Sep ’25
How can a student start learning Apple’s approach to design?
Hello everyone, I'm 14 and absolutely enthusiastic about Apple — not only the products themselves, but the design nuance, the sense that everything has been well thought-out, and even stuff like Fitness+ and the Tips app. I love how much attention Apple pays to making every aspect of the experience feel deliberate and cohesive. My dream is to eventually become an Apple employee, specifically in design (maybe even retail for the beginnin). I know that I am young right now, but I would like to start learning as soon as possible. To you all who have experience with design or anything else, what are a few things or habits one my age should focus on learning to strengthen in the right direction? to maybe reach this dream Any assistance or advice would be greatly appreciated. Thanks! chase
Topic: Design SubTopic: General
2
0
474
Sep ’25
Inconsistencies with activityBackgroundTint when a device switches between light and dark modes
While the activityBackgroundTint modifier is intended to set the background color of a Live Activity, it often fails to dynamically update, leaving the activity with an incorrect background. Replacing it with ZStack { Color(.background) .... } solves the problem, but this is a workaround. The activityBackgroundTint modifier is still needed, at a minimum, so that the "Allow Live Activity for the app" extension does not have the default color.
Topic: Design SubTopic: General Tags:
2
0
496
Sep ’25