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

@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
560
Aug ’25
Xcode 26 Issue with functional of bridging header in Xcode project with both objective-c and swift
I'm in the process of add some swift code that is all objective-c. I have trouble with my actual app so I have worked on a prototype. There is what I have done Created a new Xcode project, selecting App and Objc Added a blank Swift file and accepted the generation of the -Bridging-Header. In project build setting, Yes for Defines Modules, Yes for Always Embed Swift Libraries Add appropriate .h file to Bridging header In Build Settings, in Swift Compiler - General, Bridging Header has correct path to the bridging header file Setup the single swift file in this was using @objc like this: @objcmembers class MySwiftClass: NSObject { func myMethod() { let output = ... } } When the project runs I execute in the objc ViewController: MySwiftClass *swiftObject = [[MySwiftClass alloc] init]; and get Use of undeclared identifier 'MySwiftClass'
Topic: Design SubTopic: General
0
1
366
Oct ’25
Icon Composer for visionOS and tvOS
As of right now Icon Composer does not support creating app icons for visionOS and tvOS. It appears that only system apps can provide glass icons for those platforms. How should developers handle this? In extreme cases, the flat icon on those platforms will look wildly different from their glass counterparts. From what I have seen visionOS and tvOS also do not apply any automatic treatment like on iOS where legacy icons get a glass effect. So, third party app icons are just going to look out of place for (hopefully just) a year on those platforms? What is the recommended approach here? You could obviously fake the effect, but I feel like that would be worse.
0
1
246
Aug ’25
How to do settings icon for menu in SwiftUI?
Hi everyone. Can you help me with my settings icon design. I`m trying to create circular setting button using Menu. My code here: struct MenuView: View { var body: some View { Menu { Text("Hello") Text("How are you") } label: { Image(systemName: "gearshape.fill") .clipShape(Circle()) } .clipShape(Circle()) .padding(.top, 10) .padding(.leading, 20) } } You can see my try, this one looks wrong. It should be like this: Just Circle with setting image inside. Thank you an advance 😭🙏🛐
1
0
533
3w
Sell UI patent to Apple
I've designed a new UI for phones.. I'd like Apple to look at it and see what they think https://docs.google.com/presentation/d/10QSQvAdRRkL-eA9WRsSEbsL62XIayJ75Mbi93tx92DI/edit?usp=drive_link
Topic: Design SubTopic: General
3
0
789
Jan ’26
iOS 26 UIBarButtonItem badge
I'm using the new badge feature for UIBarButtonItem, but it's not working properly for me when transitioning between view controllers. I have two view controller with various right bar button items. In the first view controller the first button (the one with the bell) has a badge with a numeric count. The second view controller has the same button but in the third position. When I push the second view controller, it seems that the badge maintains also the old position, so I see two buttons with badges instead of one. What can I do to fix this?
Topic: Design SubTopic: General Tags:
0
1
766
Sep ’25
Align NSMenuItem title to right
In my application, I am creating a simple NSMenu with NSMenuItems. The title of the NSMenuItems are adapted to the system language. So, when the system language is an RTL language (right to left), I want my NSMenuItem to be aligned at the right. I can't see anyone talking about this, or any option that could make me achieve that easily. NSMenuItem* item1; NSMenuItem* item2; item1 = [[NSMenuItem alloc] init]; item2 = [[NSMenuItem alloc] init]; item1.title = "foo"; item2.title = "bar"; item1.action = @selector(fooAction); item2.action = @selector(barAction); NSMenu *menu = [[NSMenu alloc] init]; [menu addItem:item1]; [menu addItem:item2];
Topic: Design SubTopic: General Tags:
0
1
126
Mar ’25
Add a “Close All” button on iPhone background Apps
Hello Apple Team, I’d like to request a feature that allows users to close all background apps at once on iPhones. Currently, closing each app individually can be time-consuming, especially when many are running. A “Close All” button would greatly improve user experience and efficiency. Thank you for considering this suggestion!
Topic: Design SubTopic: General
2
1
200
Jun ’25
Spam 4.3 (a)
Hello everyone, I’ve reached out to Apple’s review team multiple times, but unfortunately, I haven’t received any clear or specific guidance on why my app was rejected. My app has been rejected several times with the reason “Spam” under guideline 4.3, and I still don't understand exactly which part of the app is problematic. Even after providing the necessary information about the data, I resubmitted the app, and after a few days, it quickly moved into "In Review" status, but then was rejected within seconds with the same “Spam” message. I have sent over 13 messages asking for specific feedback, and all I get are vague responses saying “It’s spam, refer to 4.3, fix your app, and resubmit.” However, when I review the guidelines, I don’t see any specific reasons for rejection that apply to my app. I’m particularly confused because my app is a VPN, and when I check the guidelines, I see that apps in categories like dating and others are saturated, but VPN apps are not. My app uses completely dedicated servers, and the IP addresses are not found in any other apps. Still, my app keeps getting rejected. If anyone has encountered a similar issue or has any insight into what might be causing this, I would greatly appreciate it if you could provide detailed guidance on what specifically needs to be changed to get the app approved. Thank you!
Topic: Design SubTopic: General
4
1
1.1k
1w
Ios26 beta 3 concerns about liquid glass design
With the new ios 26 beta 3 helps some stabillty and performance issues but most of the liquid glass has been removed or made very frosty look; and it defeats the whole purpose of a big redesign, and even thought the changes are because of readability and contrast complaints it should not take away liquid glass design. I think apple should consider adding a toggle or choice to choose if they would want a more frosted look or a more liquid glass look the the original plan.
Topic: Design SubTopic: General Tags:
1
1
270
Jul ’25
Icon Composer missing margins
I'm trying out Icon Composer Version 1.0 (27.4). I imported a simple logo and sized it in the outer circle. The icon appears good in the Icon Composer. But when I export the file and use it for my app icon it seems to be missing a margin or padding that other native application icons have. Am i supposed to be adding my own padding to these resulting icons or am I building them incorrectly? Any guidance would be appreciated. Thanks!
Topic: Design SubTopic: General Tags:
0
1
161
Jun ’25
Liquid Glass material behaviour question
I have two views I've applied Liquid Glass to in Swift UI. I've noticed that depending on the height of the view the material changes and I'm not sure why. See the attached screenshot. Both views add the liquidGlass style in the same way but behave very differently on the same background. Ideally I'd like them to look the same as the bottom one. Is that the same as the clear style?
3
1
367
Sep ’25
Liquid Glass Navigation Bar
The system provided liquid glass background looks terrible with my companies navigation bar background color. The navigation background color is not up for discussion and cannot be changed. The clear liquid glass style looks great and I can apply that to buttons I add to the navigation bar, but that doesn't effect the system provided back button. I would prefer to maintain the default back button functionality. Please make it possible to set the liquid glass style that the system provides for navigation bar items.
Topic: Design SubTopic: General
0
1
985
Oct ’25
Build Error
While build now I receive this error help me to resolve it Showing Recent Errors Only Prepare build error: Multiple commands produce '/Users/mayankjain/Library/Developer/Xcode/DerivedData/PCS_EmpApp-chsylqbxjptobeawzzckymqzagvr/Build/Products/Debug-iphonesimulator/PCS_EmpApp.app/Info.plist' note: Target 'PCS_EmpApp' (project 'PCS_EmpApp') has copy command from '/Users/mayankjain/Documents/05-NOV-2025-SWETA_IOS/PCS_EmpApp/PCS_EmpApp/xcode-out/Platforms/iOS/Info.plist' to '/Users/mayankjain/Library/Developer/Xcode/DerivedData/PCS_EmpApp-chsylqbxjptobeawzzckymqzagvr/Build/Products/Debug-iphonesimulator/PCS_EmpApp.app/Info.plist' note: Target 'PCS_EmpApp' (project 'PCS_EmpApp') has process command with output '/Users/mayankjain/Library/Developer/Xcode/DerivedData/PCS_EmpApp-chsylqbxjptobeawzzckymqzagvr/Build/Products/Debug-iphonesimulator/PCS_EmpApp.app/Info.plist' Multiple commands produce '/Users/mayankjain/Library/Developer/Xcode/DerivedData/PCS_EmpApp-chsylqbxjptobeawzzckymqzagvr/Build/Products/Debug-iphonesimulator/PCS_EmpApp.app/Info.plist'
Topic: Design SubTopic: General
0
1
679
Nov ’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
Jan ’26
macOS Tahoe generates low resolution wallpapers on certain Mac models
Dear Apple, please make sure this bug gets delivered to whoever is responsible. That's all I ask. Please don't let it sit for months unassigned. This is, by far, the worst bug I've ever found with the macOS wallpaper system. FB21532401 If you own a 13" 2020 or newer MacBook pro model, set to the default resolution, and are running macOS Tahoe, macOS will significantly degrade the quality of any image set as wallpaper. When a still image is set as the wallpaper on macOS Tahoe, on some display configurations, the systems downscales the image to an incorrect size, resulting in pixelated wallpaper. The problem is exacerbated by the fact that macOS Wallpaper Agent appears to be using a less than ideal downscaling algorithm, which results in Super Mario Bros’ type pixelation (nearest neighbor) as opposed to any other reasonable modern method (like bicubic.) The issue does not repro on macOS Sequoia. Every model MacBook we’ve tested offers some resolutions with some form of this problem, but the 13” is the only one where it is notably awful. The most evident default case of this is the 13” MacBook Pro models with a 2560x1600 physical display (for example, 2020 MacBook Pro 13” (17,1.)) These models have a physical display resolution of 2560x1600, and a default scaled resolution of 1440x900. The relationship between the physical resolution and scaled resolution is not an even ratio (1:1 or 2:1), which seems to be the common condition under which this issue occurs. Repro steps: Set the systems display resolution to the default resolution - ideally on the model described above (see details on this below) Set a high resolution image (in this example 5120x2880) as the system wallpaper using any method Results: On the model described above, Wallpaper Agent will generate and display a 1440x810 image as the wallpaper. It should be generating and displaying at a minimum of 2560x1600, or more appropriately at 2880x1800 which is the proper 2X resolution. This can be confirmed by viewing the properties of the generated images in the macOS wallpaper cache here: ~/Library/containers/com.apple.wallpaper.agent/Data/Library/Caches/com.apple.wallpaper.caches/extension-com.apple.wallpaper.extension.image On modern Apple systems, the only situation in which the wallpaper should be generated at 1X is when the physical resolution and set resolution are 1:1. In any situation where the physical resolution is larger than the set resolution, the image should be generated at 2X the set resolution. As far as we can tell, this issue impacts any format, and any resolution of image, and occurs independent of the set image resolution.
Topic: Design SubTopic: General
0
1
333
Jan ’26
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
Shadow on top of Vision OS icon
Hi guys, I've exported the images with transparency for a Vision OS icon but I still keep getting a weird shadow on the top of the icon when I focus on it. Do you guys had this issue before?
Topic: Design SubTopic: General
0
1
1.6k
Nov ’25