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

MusicKit design guidelines
Hi community, I have a question regarding MusicKit, is it necessary to follow a design guideline to integrate this framework into my App? Also, when no music is reproducing in MusicKit which placeholder we should show, do you provide the resource? Or can we create our own placeholder? Thanks for all, David.
0
0
106
2d
Wrong unit in HIG > Components > System Experiences > Widget > watchOS widget dimensions
Hello, I noticed a small mistake in the Human Interface Guidelines (HIG). On the page HIG > Components > System Experiences > Widget > watchOS Widget Dimensions, scroll down to the bottom. In the "watchOS widget dimensions" section, the sizes in the table are in pixels (px), not points (pt) actually. However, the table header indicates the sizes should be in points (pt). Page link: https://developer.apple.com/design/human-interface-guidelines/widgets#watchOS-widget-dimensions For example, the widget size in the Smart Stack on a 49mm watch should be 192x81.5 pt (or 382x163 px), not 382x163 pt. This size can be verified with the information provided here: https://developer.apple.com/documentation/watchos-apps/supporting-multiple-watch-sizes/. https://developer.apple.com/documentation/watchkit/wkinterfacedevice/1620974-screenscale
3
0
611
Aug ’24
(tvOS) Categories or Selection Menus Don't Fit the Design
Hi everyone, I'm currently working on my own Apple TV app. So far, things are going pretty well, but right now, I'm stuck on the design of the categories or selection menus. Here's a screenshot of how it looks right now: The green color and the border are intentionally added for now so I can see what is where. My actual goal is to remove the gray bar (or is this the "main bar"?). The pink bar and its border are just design elements that can be removed if needed. I want it to look more "original," like this: Here is the code: let title: String let isSelected: Bool var body: some View { HStack { Text(title) .foregroundColor(isSelected ? .black : .white) .font(.system(size: 22, weight: .regular)) .padding(.leading, 20) Spacer() Image(systemName: "chevron.right") .foregroundColor(isSelected ? .black : .gray) .padding(.trailing, 20) } .frame(height: 50) // Einheitliche Höhe für die Kategorien .background(Color.pink) // Innerer Hintergrund auf pink gesetzt .cornerRadius(10) // Abrundung direkt auf den Hintergrund anwenden .overlay( RoundedRectangle(cornerRadius: 10) .stroke(Color.green, lineWidth: 3) // Äußerer Rahmen auf grün gesetzt ) .padding(.horizontal, 0) // Entferne äußere Ränder .background(Color.clear) // Entferne alle anderen Hintergründe } } struct SettingsView_Previews: PreviewProvider { static var previews: some View { SettingsView() } } I’ve adjusted the code, but it’s still not quite right. When a category is not selected, it appears black instead of gray, like in the original design Here is the code: struct SettingsView: View { @State private var selectedCategory: String? var body: some View { NavigationStack { ZStack { Color.black .edgesIgnoringSafeArea(.all) VStack(spacing: 0) { // Überschrift oben in der Mitte Text("Einstellungen") .font(.system(size: 40, weight: .semibold)) .foregroundColor(.white) .padding(.top, 30) HStack { // Linke Seite mit Logo VStack { Spacer() Image(systemName: "applelogo") .resizable() .scaledToFit() .frame(width: 120, height: 120) .foregroundColor(.white) Spacer() } .frame(width: UIScreen.main.bounds.width * 0.4) // Rechte Seite mit Kategorien VStack(spacing: 15) { ForEach(categories, id: \.self) { category in NavigationLink( value: category, label: { SettingsCategoryView( title: category, isSelected: selectedCategory == category ) } ) .buttonStyle(PlainButtonStyle()) } } .frame(width: UIScreen.main.bounds.width * 0.5) } } } .navigationDestination(for: String.self) { value in Text("\(value)-Ansicht") .font(.title) .foregroundColor(.white) .navigationTitle(value) } } } private var categories: [String] { ["Allgemein", "Benutzer:innen und Accounts", "Video und Audio", "Bildschirmschoner", "AirPlay und HomeKit", "Fernbedienungen und Geräte", "Apps", "Netzwerk", "System", "Entwickler"] } } struct SettingsCategoryView: View { let title: String let isSelected: Bool var body: some View { HStack { Text(title) .foregroundColor(.white) .font(.system(size: 22, weight: .medium)) .padding(.leading, 20) Spacer() Image(systemName: "chevron.right") .foregroundColor(.gray) .padding(.trailing, 20) } .frame(height: 50) // Einheitliche Höhe für die Kategorien .background(isSelected ? Color.gray.opacity(0.3) : Color.clear) // Hervorhebung des ausgewählten Elements .cornerRadius(8) // Abgerundete Ecken .scaleEffect(isSelected ? 1.05 : 1.0) // Fokus-Animation .animation(.easeInOut, value: isSelected) } } struct SettingsView_Previews: PreviewProvider { static var previews: some View { SettingsView() } }
0
0
204
1w
Issue displaying Button Text after a MeshGradient applied
I am creating a Generate note app but I don't see the text in the button when I applied the MeshGradient. I removed the Mesh Gradient and text is there. Need some help to find the issue. I am new to app Development and I am learning how to use it. Below is the code: import SwiftUI struct ContentView: View { @State private var inputText: String = "" @State private var isLoading: Bool = false var body: some View { ZStack { Color(.systemGray6).edgesIgnoringSafeArea(.all) VStack (spacing: 20) { Text("Generate Notes") .font(.title) .fontWeight(.bold) .frame(maxWidth: .infinity, alignment: .leading) Text("Transform your thoughts into well-structured notes using artificial intelligence.") .font(.subheadline) .foregroundStyle(.secondary) .frame(maxWidth: .infinity, alignment: .leading) TextEditor(text: $inputText) .frame(height: 200) .padding() .background(RoundedRectangle(cornerRadius: 16) .fill(Color(.systemGray6))) Button(action: {}) { HStack { if isLoading { ProgressView() .tint(.white) } else { Image(systemName: "sparkles") } Text(isLoading ? "Generating..." : "Generate Notes") } .padding() .frame(maxWidth: .infinity) .background( MeshGradient(width: 3, height: 3, points: [ .init(0, 0), .init(0.5, 0), .init(1, 0), .init(0, 0.5), .init(0.5, 0.5), .init(1, 0.5), .init(0, 1), .init(0.5, 1), .init(1, 1) ], colors: [ .blue, .purple, .indigo, .orange, .white, .blue, .yellow, .green, .mint ]) ) .mask( RoundedRectangle(cornerRadius: 16) .stroke(lineWidth: 16) .blur(radius: 8) ) .overlay( RoundedRectangle(cornerRadius: 16) .stroke(.white, lineWidth: 1) .blur(radius: 1) .blendMode(.overlay) ) .background(.black) .foregroundColor(.white) .cornerRadius(16) .background( RoundedRectangle(cornerRadius: 16) .stroke(.black.opacity(0.5), lineWidth: 1) ) .shadow(color: .black.opacity(0.15), radius: 20, x: 0, y: 20) .shadow(color: .black.opacity(0.1), radius: 15, x: 0, y: 15) } .disabled(isLoading || inputText.isEmpty) Spacer() } .padding(32) .background(Color(.systemBackground)) .cornerRadius(44) .shadow(color: .black.opacity(0.1), radius: 20, x:0, y:10) } } } #Preview { ContentView() }
1
0
247
1w
Launch screen more vibrant in iOS18?
Hi! I've detected that in iOS18 launch screen colors differs from the defined ones, that is, if I create a launch screen with a color like #ff0000 (red) and the initial view controller is a view controller with the same color as background, I can see the transition between launch screen and the initial view controller because the launch screen color is different from the other one (dark in this case). I've tested it with several colors: left side is the launch screen and right side is the initial view controller. Both views created with IB using the same colors (it also happens with background images using colors) Is this an intentionall behavior? If so, theres a way to disable it? I need the transition between the launch screen and my initial view controller to be non perceptible... Thanks!
4
1
210
1w
System fonts file access: allowed for sandboxed apps?
Hello! I am developing an ebook reader iOS app that uses c/c++ codec as a page renderer. The codec uses TrueType as a font rendering engine that requires access to .ttf (or .ttc) files. Currently, I supply TrueType with fonts embedded in the app package, so they lay within the app sandbox. The codec supports the whole unicode plane and many languages that ebooks may use, but the fonts I supply don't have some of the important glyphs (i.e. katakana or hangul). I see that iOS has its own font storage, located in /System/Library/Fonts/ directory. The codec is able to parse this directory and read .ttf files located inside, using these fonts as a fallback in the case when the supplied fonts can't draw certain glyphs. I use opendir and fopen(in "rb" mode) as a way to read the data, and it works well. Does this type of access to the system directory violate the sandbox rule for an app distribution, and, if yes, is there a way to get access to stored .ttf files not violating the mentioned rule?
1
0
655
Jan ’24
How to attribute/credit Apple Fonts added to app?
My app lets users create things with text, and I've included Apple fonts so users can format their text with them. These were fonts I found in the Font Book app that comes with macOS. My assumption is that these, like the San Francisco font, can be distributed with apps. Do I need to attribute these fonts to their creators and publish a license in my "About" page? If so, where do I find the license(s) and what is the proper way of publishing them? Is there anything else I should know? Please let me know if this should've been posted under a different topic and tag
3
0
786
Jun ’24
Are default fonts under UIFont.familyNames licensed for use by iOS developers?
This is a follow-up to my previous question: How to attribute/credit Apple Fonts added to app? In that previous post, I misremembered what I did and said I found fonts via macOS' FontBooks, when instead I came acrossUIFont.familyNames. Since these are included via UIKit, the legal implications should be different. I looked at various license agreements that govern iOS app development but haven't found anything mentioning fonts. Since these are included as part of UIKit, its reasonable to assume that developers are allowed to include these fonts--but in what ways? Am I allowed to let users create, say, documents with these fonts? Am I only allowed to display these fonts? There are 84 fonts, and judging by their FontBook entries, there is a wide range of licenses and restrictions. It seems unnecessarily harsh to have every iOS developer verify each one and figure out which they can legally keep if they want to offer their users access to all (for, say, a text-editing app). There must be some overarching rule that supersedes/encapsulates them, but this rule isn't clear to me after hours of research. I'm not a lawyer, and I don't think Apple expects every app developer to consult their lawyers on whether they can use system fonts. I'm about to send an email to Apple's legal team (I will post their response here if allowed), but in the meantime I want to hear what other devs think about this. In Xcode, entering UIFont.familyNames returns the following: ["Academy Engraved LET", "Al Nile", "American Typewriter", "Apple Color Emoji", "Apple SD Gothic Neo", "Apple Symbols", "Arial", "Arial Hebrew", "Arial Rounded MT Bold", "Avenir", "Avenir Next", "Avenir Next Condensed", "Baskerville", "Bodoni 72", "Bodoni 72 Oldstyle", "Bodoni 72 Smallcaps", "Bodoni Ornaments", "Bradley Hand", "Chalkboard SE", "Chalkduster", "Charter", "Cochin", "Copperplate", "Courier New", "Damascus", "Devanagari Sangam MN", "Didot", "DIN Alternate", "DIN Condensed", "Euphemia UCAS", "Farah", "Futura", "Galvji", "Geeza Pro", "Georgia", "Gill Sans", "Grantha Sangam MN", "Helvetica", "Helvetica Neue", "Hiragino Maru Gothic ProN", "Hiragino Mincho ProN", "Hiragino Sans", "Hoefler Text", "Impact", "Kailasa", "Kefa", "Khmer Sangam MN", "Kohinoor Bangla", "Kohinoor Devanagari", "Kohinoor Gujarati", "Kohinoor Telugu", "Lao Sangam MN", "Malayalam Sangam MN", "Marker Felt", "Menlo", "Mishafi", "Mukta Mahee", "Myanmar Sangam MN", "Noteworthy", "Noto Nastaliq Urdu", "Noto Sans Kannada", "Noto Sans Myanmar", "Noto Sans Oriya", "Optima", "Palatino", "Papyrus", "Party LET", "PingFang HK", "PingFang SC", "PingFang TC", "Rockwell", "Savoye LET", "Sinhala Sangam MN", "Snell Roundhand", "STIX Two Math", "STIX Two Text", "Symbol", "Tamil Sangam MN", "Thonburi", "Times New Roman", "Trebuchet MS", "Verdana", "Zapf Dingbats", "Zapfino"]
1
0
588
Jul ’24
Your app included hard to read type or typography
I recently submitted a new app for review, but it has been rejected multiple times for vague reasons. The most recent rejection reason I received was unclear, leaving me unsure of what improvements are needed to get the app approved for the App Store. Does anyone have any advice on how to address this? Additionally, to Apple reviewers: Could you please provide more detailed feedback to help developers improve their apps? The repeated review process takes a significant amount of time, and guessing what needs to be fixed without clear guidance makes it even more challenging. ################################# The latest rejection reason I got is: Guideline 4.0 - Design We noticed an issue in your app that contributes to a lower-quality user experience than App Store users expect: Your app included hard to read type or typography. Since App Store users expect apps to be simple, refined, and easy to use, we want to call your attention to this design issue so you can make the appropriate changes. Next Steps Please revise your app to address all instances of the issue identified above.
1
0
236
1w
Calendar Display App
Hello, I want to make an app that displays the current event(s) (The ones that are ongoing at any given moment) on my Google calendar and shows how far through the event(s) I am with a progress bar, and updates live. I want it to be as simple as possible and don't want it to take up too much space. I have a little window with some text elements and a progress bar that works if you manually put in values. But I still think the window is too big and clunky and I wonder if it's possible to change it's style? I'm a bit inexperienced with coding and am completely new to xcode and swift. What approach would you recommend I take with this project? Or what resources would you refer me to?
0
1
231
2w
Type of Apple ble beacons
Our custom ble based app starts a service uuid beacon to advertise. When the app is put in background, the beacon is shifted to another beacon and a specific beacon data is put in the scan response one example is like: 0x14FF4C000100000000000000000000000000040000 I want to know what is the format of this beacon. I can see its a manufacturer type data with apple company id and beacon type is 0x01. I want to know what this type means and how is the data which follows is calculated.
3
1
250
2w
Helvetica issues
Helvetica (17.0d1e1) has bugs, hopefully the developers and designers will fix it. Link to the presentation: https://drive.google.com/file/d/16qfpo9Y7Psghv5c_Xl3JBiTPkP4QNaaS/view?usp=sharing
0
0
146
2w
Progress Ring Artifact
I'm working to emulate the Activity Rings featured in Apple's Fitness app. Here's a copy of what's in the swift file so far. // // ProgressRingPrototype.swift // Nutrition // // Created by Derek Chestnut on 1/13/25. // import SwiftUI struct ProgressRingPrototype: View { @State var progress = 0.00 let size: CGSize let thickness: CGFloat var color: Color? var gradientColors: [Color]? var body: some View { let color = color ?? .primary ZStack { RingPrototype( size: self.size, thickness: self.thickness, color: color.opacity(0.2) ) let gradient = AngularGradient( colors: gradientColors ?? [.primary, .secondary], center: .center ) let style = StrokeStyle( lineWidth: 32, lineCap: .round ) Circle() .trim(from: 0, to: progress) .stroke(gradient, style: style) .rotationEffect(.degrees(-90)) .frame(width: size.width, height: size.height) } .onAppear { DispatchQueue.main.asyncAfter(deadline: .now() + 1) { withAnimation(.easeInOut(duration: 1)) { progress = 0.75 } } } } } #Preview { ZStack { ProgressRingPrototype( progress: 0.1, size: CGSize(width: 256, height: 256), thickness: CGFloat(32), color: .primary ) ProgressRingPrototype( progress: 0.1, size: CGSize(width: 190, height: 190), thickness: CGFloat(32), color: .primary ) ProgressRingPrototype( progress: 0.1, size: CGSize(width: 124, height: 124), thickness: CGFloat(32), color: .primary ) } } Here's a snapshot of the live preview. I'm experiencing an issue where the trailing line cap generated by the stroke exceeds the start angle of the angular gradient, which creates an ugly artifact at 0 degrees. Anyone have a solution to this problem? Derek
0
0
143
2w
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
313
3w