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
Posts under Design topic

Post

Replies

Boosts

Views

Activity

@State variable returns empty despite being set in .onAppear function
With the code below, JSON data is parsed and is stored in the variable data in the .onAppear function, however an empty set of data is passed to the Content view. How can that be fixed so that the JSON data passes to the DataView? struct ContentView: View { @State var data: [Data] @State var index: Int = 0 var body: some View { VStack { DataView(data: data[index]) } .onAppear { let filePath = Bundle.main.path(forResource: "data", ofType: "json") let url = URL(fileURLWithPath: filePath!) data = getData(url: url) } } func getData(url: URL) -> [Data] { do { let data = try Data(contentsOf: url) let jsonDecoded = try JSONDecoder().decode([Data].self, from: data) return jsonDecoded } catch let error as NSError { print("Fail: \(error.localizedDescription)") } catch { print("Fail: \(error)") } return [] } }
17
1
545
Aug ’25
Section Header Overlaps with Cell Text in Plain List Style on iOS 26
Hi everyone, I've noticed that on iOS 26 beta 1 through beta 4, when using a List with the .plain style, the section header overlaps with the cell content below it, as there is no background for the header. This creates a poor visual experience. Additionally, when using NavigationSplitView on iPad, the second column's list always shows this issue. Is this an intentional design change, or just a temporary issue? I haven't found a good workaround so far. Thanks! FB19066489
0
1
589
Jul ’25
Contact UISearchBar missing.
Feedback id: FB16140301 Below are the steps to reproduce the bug in Contacts app. Open Contacts app. Now search for a contact and didSelect that contact. Now slightly hold swipe right(from view's center leading position) as to pop the view but not fully swipe, now release the finger and you can see the back nav bar button missing and tapping the back button position also doesn't perform dismiss action. Now do fully swipe from left to right to dismiss(pop) current view. Here you can see the search bar missing.-> That's the bug.
0
1
129
Jun ’25
Color folder and tags
I’m delighted with the introduction of new color folders. Although, I can’t help but wonder why we still need both color folders and tags. Aren’t the color folders sufficient for our needs?
Topic: Design SubTopic: General
3
1
1.2k
Aug ’25
CarPlay navigation issue, maximum depth
Hi everyone, I am working on a CarPlay integration, and need open a two level list opened from a root template. However, I am always receiving an error message when opening the 2nd pushed template. To narrow it down not to have an issue with some app specific code I created the CarPlay scene below. I am aware that there is a limit, but two levels I understand are supported on all CarPlay integrations, the maximum seems to be 5. The app is just crashing right after showing the 2nd template. Any ideas? Any hints are much appreciated. Thanks a lot! Regards, Michael class CarPlaySceneDelegate2: UIResponder, CPTemplateApplicationSceneDelegate { // [...] private func createRootTemplate() -> CPListTemplate { let pushToAItem = CPListItem(text: "Push to Template A", detailText: "Level 1 → Level 2") pushToAItem.handler = {[weak self] (pushToAItem, completion) in guard let self = self else { completion() return } self.interfaceController?.pushTemplate( self.pushTemplateA(), animated: true, completion: { (didPresent, error) in completion() } ) } let section = CPListSection(items: [pushToAItem]) let template = CPListTemplate(title: "Root Template", sections: [section]) return template } private func pushTemplateA() -> CPListTemplate { let pushToBItem = CPListItem(text: "Push to Template B", detailText: "Level 2 → Level 3") pushToBItem.handler = {[weak self] (pushToBItem, completion) in guard let self = self else { completion() return } self.interfaceController?.pushTemplate( self.pushTemplateB(), animated: true, completion: { (didPresent, error) in completion() } ) } let backToRootItem = CPListItem(text: "Pop to Root", detailText: "Go back to root") backToRootItem.handler = { [weak self] _, completion in self?.interfaceController?.popToRootTemplate(animated: true, completion: nil) completion(); } let infoItem = CPListItem(text: "Current Depth", detailText: "2 (Template A)") let stackCountItem = CPListItem( text: "Stack Count", detailText: "\((interfaceController?.templates.count ?? 0) + 1)" ) let section = CPListSection(items: [pushToBItem, backToRootItem, infoItem, stackCountItem]) let template = CPListTemplate(title: "Template A", sections: [section]) return template } private func pushTemplateB() -> CPListTemplate { let pushToCItem = CPListItem(text: "Push to Template C", detailText: "Level 3 → Level 4") pushToCItem.handler = {[weak self] (pushToCItem, completion) in guard let self = self else { completion() return } self.interfaceController?.pushTemplate( self.pushTemplateC(), animated: true, completion: { (didPresent, error) in completion() } ) } let backToRootItem = CPListItem(text: "Pop to Root", detailText: "Go back to root") backToRootItem.handler = { [weak self] _, completion in self?.interfaceController?.popToRootTemplate(animated: true, completion: nil) completion() } let popOneItem = CPListItem(text: "Pop One", detailText: "Go back to Template A") popOneItem.handler = { [weak self] _, completion in self?.interfaceController?.popTemplate(animated: true, completion: nil) completion() } let infoItem = CPListItem(text: "Current Depth", detailText: "3 (Template B)") let stackCountItem = CPListItem( text: "Stack Count", detailText: "\((interfaceController?.templates.count ?? 0) + 1)" ) let section = CPListSection(items: [pushToCItem, popOneItem, backToRootItem, infoItem, stackCountItem]) let template = CPListTemplate(title: "Template B", sections: [section]) return template } private func pushTemplateC() -> CPListTemplate { let backToRootItem = CPListItem(text: "Pop to Root", detailText: "Go back to root") backToRootItem.handler = { [weak self] _, completion in self?.interfaceController?.popToRootTemplate(animated: true, completion: nil) completion() } let popOneItem = CPListItem(text: "Pop One", detailText: "Go back to Template B") popOneItem.handler = { [weak self] _, completion in self?.interfaceController?.popTemplate(animated: true, completion: nil) completion() } let infoItem = CPListItem(text: "Current Depth", detailText: "4 (Template C)") let stackCountItem = CPListItem( text: "Stack Count", detailText: "\((interfaceController?.templates.count ?? 0) + 1)" ) let section = CPListSection(items: [popOneItem, backToRootItem, infoItem, stackCountItem]) let template = CPListTemplate(title: "Template C", sections: [section]) return template } }
2
0
1.6k
1w
iOS 26 Beta 7 double-tap to select text while in Dark Mode makes it very difficult to see what you're selecting. This has been an issue since Beta 1 and seems like intended behavior.
This has been an issue since installing the first beta and I haven't seen anyone else say anything about it so I feel like I'm going kind of bonkers. While using Dark Mode, double-tapping to select a word while using the Liquid Glass keyboard, like in Messages or Safari, produces a flashlight-like effect over the text with each tap. While this is a fine animation and pretty helpful when moving the cursor, the brightness of the flashlight effect on white text in Dark Mode makes it impossible to see what you're actually tapping to select. The brightness seems to intensify 100x when rapidly tapping. This is not an issue in Light Mode when the text itself is black. To recreate this, just turn your phone to Dark Mode, go into Messages and type a few words into a thread. Try to double-tap to select a word in the text box. The brightness of the selected word should intensify to the point of being unable to see the word itself. Has anyone been bothered by this? Is there a way to fix or adjust it? I've tried reducing transparency and a bunch of other settings but nothing has worked.
Topic: Design SubTopic: General
0
1
758
Aug ’25
Too large clock size on iOS 26 Lock Screen.
The clock on the lock screen is too big. This is very noticeable on the serif font, the maximum size goes beyond the frame, and rests on the frame of the phone display. (Screenshot 1 & Screenshot 3) This is especially evident if you use the enlarged interface (using the Large Text function), here the time goes completely out of the frame and conflicts with the frame of the phone screen. (Screenshot 2 & Screenshot 4)
Topic: Design SubTopic: General Tags:
3
1
1.1k
3w
Greyed out app icon on iOS 26 beta
On iOS 26 beta 3, my app and some other apps got greyed out app icon. It only happens in Default (Light) appearance. Apple automatically converts third-party app icons to support Liquid Glass, but is there any specific requirement with third-party icons to avoid above greyed out app icon issue?
0
1
600
4w
Requirements for application functions that use some WeatherKit data
Hi there I have developed an offline algorithm for calculating tides, which works based on the built-in database of tidal stations in some regions. The algorithm works correctly and the results match the real data. I would like to receive and add moon data from Weather Kit to the algorithm for performance improvement experiments. What requirements do I need to apply to the application so that I can use data from Weather Kit in my algorithm ?
Topic: Design SubTopic: General
1
0
75
Jun ’25
UITabBarController with sidebar on iPadOS 18
When I create a tab group for the sidebar on iPad, the title and disclosure triangle act like a single control. Every time I tap the section title, the disclosure triangle for that section activates and hides or exposes that section's children and actions. I want the section title to behave like Photos, where tapping a section title just displays its view controller, and the disclosure triangle is a separate control that must be tapped to hide and show children and actions. I did not see any delegate methods that would let me control this behavior. Is this supported?
1
0
199
May ’25
Make default Standby clock
Is there any way to lock the clock in Standby so it doesn't change? It is so frustrating when I put the phone on the charger and have to scroll back and forth, trying to find the clock I would like to use all the time.
Topic: Design SubTopic: General
1
0
587
Feb ’25
Novice SwiftUI developer can't make network call
I'm trying to use URL structure in the foundation framework and it is failing to build, returning a nil value. Could it be trying to evaluate the string I am giving it as a variable for its argument at build time? Is there a test argument I can give URL to see if it can return a non-nil value? (of URL type)?
Topic: Design SubTopic: General
17
0
1.6k
Sep ’25