Create elegant and intuitive apps that integrate seamlessly with Apple platforms.

All subtopics
Posts under Design topic

Post

Replies

Boosts

Views

Activity

(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
514
Jan ’25
OCR does not work
Hi, I'm working with a very simple app that tries to read a coordinates card and past the data into diferent fields. The card's layout is COLUMNS from 1-10, ROWs from A-J and a two digit number for each cell. In my app, I have field for each of those cells (A1, A2...). I want that OCR to read that card and paste the info but I just cant. I have two problems. The camera won't close. It remains open until I press the button SAVE (this is not good because a user could take 3, 4, 5... pictures of the same card with, maybe, different results, and then? Which is the good one?). Then, after I press save, I can see the OCR kinda works ( the console prints all the date read) but the info is not pasted at all. Any idea? I know is hard to know what's wrong but I've tried chatgpt and all it does... just doesn't work This is the code from the scanview import SwiftUI import Vision import VisionKit struct ScanCardView: UIViewControllerRepresentable { @Binding var scannedCoordinates: [String: String] var useLettersForColumns: Bool var numberOfColumns: Int var numberOfRows: Int @Environment(.presentationMode) var presentationMode func makeUIViewController(context: Context) -> VNDocumentCameraViewController { let scannerVC = VNDocumentCameraViewController() scannerVC.delegate = context.coordinator return scannerVC } func updateUIViewController(_ uiViewController: VNDocumentCameraViewController, context: Context) {} func makeCoordinator() -> Coordinator { return Coordinator(self) } class Coordinator: NSObject, VNDocumentCameraViewControllerDelegate { let parent: ScanCardView init(_ parent: ScanCardView) { self.parent = parent } func documentCameraViewController(_ controller: VNDocumentCameraViewController, didFinishWith scan: VNDocumentCameraScan) { print("Escaneo completado, procesando imagen...") guard scan.pageCount > 0, let image = scan.imageOfPage(at: 0).cgImage else { print("No se pudo obtener la imagen del escaneo.") controller.dismiss(animated: true, completion: nil) return } recognizeText(from: image) DispatchQueue.main.async { print("Finalizando proceso OCR y cerrando la cámara.") controller.dismiss(animated: true, completion: nil) } } func documentCameraViewControllerDidCancel(_ controller: VNDocumentCameraViewController) { print("Escaneo cancelado por el usuario.") controller.dismiss(animated: true, completion: nil) } func documentCameraViewController(_ controller: VNDocumentCameraViewController, didFailWithError error: Error) { print("Error en el escaneo: \(error.localizedDescription)") controller.dismiss(animated: true, completion: nil) } private func recognizeText(from image: CGImage) { let request = VNRecognizeTextRequest { (request, error) in guard let observations = request.results as? [VNRecognizedTextObservation], error == nil else { print("Error en el reconocimiento de texto: \(String(describing: error?.localizedDescription))") DispatchQueue.main.async { self.parent.presentationMode.wrappedValue.dismiss() } return } let recognizedStrings = observations.compactMap { observation in observation.topCandidates(1).first?.string } print("Texto reconocido: \(recognizedStrings)") let filteredCoordinates = self.filterValidCoordinates(from: recognizedStrings) DispatchQueue.main.async { print("Coordenadas detectadas después de filtrar: \(filteredCoordinates)") self.parent.scannedCoordinates = filteredCoordinates } } request.recognitionLevel = .accurate let handler = VNImageRequestHandler(cgImage: image, options: [:]) DispatchQueue.global(qos: .userInitiated).async { do { try handler.perform([request]) print("OCR completado y datos procesados.") } catch { print("Error al realizar la solicitud de OCR: \(error.localizedDescription)") } } } private func filterValidCoordinates(from strings: [String]) -> [String: String] { var result: [String: String] = [:] print("Texto antes de filtrar: \(strings)") for string in strings { let trimmedString = string.replacingOccurrences(of: " ", with: "") if parent.useLettersForColumns { let pattern = "^[A-J]\\d{1,2}$" // Letras de A-J seguidas de 1 o 2 dígitos if trimmedString.range(of: pattern, options: .regularExpression) != nil { print("Coordenada válida detectada (letras): \(trimmedString)") result[trimmedString] = "Valor" // Asignación de prueba } } else { let pattern = "^[1-9]\\d{0,1}$" // Solo números, de 1 a 99 if trimmedString.range(of: pattern, options: .regularExpression) != nil { print("Coordenada válida detectada (números): \(trimmedString)") result[trimmedString] = "Valor" } } } print("Coordenadas finales después de filtrar: \(result)") return result } } }
0
0
496
Jan ’25
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.
Topic: Design SubTopic: General Tags:
1
0
437
Jan ’25
learning coregraphics help: connecting line to circles
Hi everyone, im in the process of delving more into coregraphics with swiftui, but I am at a roadblock. First I would like to ask, what are some good resources to learn coregraphics? Secondly: I currently have a circle view made and what I want to do is to make my circle view modular so that it can be directly connected to another given circle by a line. How can I do this? For example, I want my circles to represent nodes and be able to connect by lines to other nodes that are related. Thanks in advanced. Here is my code for the circle view: @State private var circleProgress: CGFloat = 0 let timer = Timer.publish(every: 0.016, on: .main, in: .common).autoconnect() private let animationDuration: TimeInterval = 1.5 @Binding var startPoint: CGPoint @Binding var endPoint: CGPoint var body: some View { GeometryReader { geometry in Canvas { context, size in // Circle parameters let circleSize: CGFloat = 50 let circleOrigin = CGPoint( x: size.width / 4, y: size.height / 2 - circleSize / 2 ) let circleRect = CGRect( origin: circleOrigin, size: CGSize(width: circleSize, height: circleSize) ) let circleCenter = CGPoint( x: circleOrigin.x + circleSize / 2, y: circleOrigin.y + circleSize / 2 ) // Animate circle creation var circlePath = Path() circlePath.addArc( center: circleCenter, radius: circleSize / 2, startAngle: .degrees(0), endAngle: .degrees(360 * circleProgress), clockwise: false ) context.addFilter(.shadow(color: .white.opacity(0.6), radius: 5, x: 1, y: 1)) // Add white shadow context.stroke( circlePath, with: .linearGradient( Gradient(colors: [.purple, .white]), startPoint: circleRect.origin, endPoint: CGPoint(x: circleRect.maxX, y: circleRect.maxY) ), lineWidth: 5 ) } .frame(width: 300, height: 150) .onReceive(timer) { _ in // Update circle progress let progressChange = 0.02 / animationDuration if circleProgress < 1.0 { circleProgress = min(circleProgress + progressChange, 1.0) } else { circleProgress = 0.0 // Reset the circle to repeat the animation } // Get the starting and ending points of the Canvas view startPoint = CGPoint(x: geometry.frame(in: .global).minX, y: geometry.frame(in: .global).minY) endPoint = CGPoint(x: geometry.frame(in: .global).maxX, y: geometry.frame(in: .global).maxY) // Print the points for debugging print("Start Point: \(startPoint.x), \(startPoint.y)") print("End Point: \(endPoint.x), \(endPoint.y)") } } .frame(width: 300, height: 150) } }
1
0
475
Jan ’25
how to save the state when I open another APP ?
how to save the state of my APP when I open another APP so that It can restore when I re-open it? my app will use over 10mb memory so if I open another APP(my app will go background) it will closed at all. when I re-open it it will restart. but I do not want it I want if I open Page A and then it go background and when I re-open it it still is Page A and do not restart.
2
0
326
Jan ’25
Apple keeps preventing us for updating our app
It has been over a month since we first attempted to update our app. The issue we wanted to resolve is a bug that prevents in-app purchases from functioning properly. Fixing this bug was crucial—not only for our users but also for us as a company. However, what seemed like a simple fix has turned into an absolute nightmare. Despite our app successfully undergoing 20+ updates in the past, we now face a consistent rejection under guideline 4.3(a) - Design - Spam. Every single submission has been met with the same response. We’ve made significant changes to the app, introduced numerous features, and thoroughly reviewed every aspect, yet the rejections persist. Desperate for clarity, we scheduled a call with an Apple representative. During the call, we were told that the issue was related to our app’s screenshots. We accepted their feedback, updated the screenshots, and resubmitted the app—only to be rejected again. Since then, we’ve submitted the app three additional times, each with new sets of screenshots. Yet, the outcome has remained unchanged. Every review has been completed within about 20 minutes, with the same generic response: "Hello, The issues we previously identified still need your attention. If you have any questions, we are here to help. Reply to this message in App Store Connect and let us know." We’ve now updated the screenshots three times, but nothing has changed. Is the issue truly related to the screenshots? Or is there something else at play? We’ve already spent over 30 days trying to resolve this. Should we continue uploading a 4th, 5th, or even 6th set of screenshots, only to receive the same rejection? The lack of clarity is incredibly disheartening. I’ve pleaded with Apple to provide specific, actionable feedback so we can address the problem effectively, but the responses are always the same—copy-pasted and vague. I’m feeling completely devastated and frustrated. At this point, I’m even considering giving up on my job entirely. If anyone has advice or insights, please help. I don’t know what to do anymore.
3
0
350
Jan ’25
Controlling the focus order in a UICollectionView
I'm running into a problem with the focus order in my UICollectionView in my tvOS app. The layout of my app is outlined in the following diagram On the uppermost layer I have a UITableView, each cell containing a single UICollectionView that can contain a variable number of UICollectionViewCells. When the user swipes down, I want the left-most item in the next row down to be selected, as follows: I've been able to get this to work for the majority of cases. The exception is when the previously focused item extends to the length of the screen - in this case the next focused item isn't the leftmost item, but rather the center item, as follows. Using focus guides won't really fit the use case here since collection views are dynamically generated. I've found that there is a function in UICollectionViewDelegate, indexPathForPreferredFocusedView that should help here but it only seems to be called intermittedly, even though I have set remembersLastFocusedIndexPath on the collectionview to true. I can force it to be called by calling setNeedsFocusUpdate() but I can't figure out a good place to call it - shouldUpdateFocus is too early and didUpdateFocus is too late. Is there some way to constrain the focus area of a view to a certain subset of it's frame - for example, the left-most quarter of its width? Or does anyone know of some other solution to this problem?
1
0
505
Jan ’25
How do you make buttons inline with each other?
I want to make my buttons inline with each other, but spaced apart, a bit like the apple topbar BUT in swift. My code: struct NormalPageView: View { var body: some View { VStack { NavigationView { Form { Section { Image(systemName: "house.fill") Spacer() Image(systemName: "plus") Spacer() Image(systemName: "gearshape.fill") } } }
1
0
293
Jan ’25
Open UIViewController when QR Code is scanned
Hi developers, I have a question if it is possible to open in my application not main window but a specific ViewController, when application is installed but not running. When the application is running in background and I scan QR code, then specific ViewController is opened over SceneDelegate and method 'userActivity'. But this does not work when the application is only installed, but not running. The Appstore link is here: https://apps.apple.com/us/app/don%C3%A1tor/id6473955033
3
0
837
Jan ’25
Getting rejected with: Guideline 4.3(a) - Design - Spam
Hello everyone, I'm stuck here, i have developed an app, and i keep getting from Apple "Guideline 4.3(a) - Design - Spam" - We continue to notice that your app shares a similar binary, metadata, and/or concept as apps submitted to the App Store by other developers, with only minor differences. As i was looking around this seems to be so much an issue now for many people and i don't understand why. My app which is approved in Android already it have an unique design built my own, and the most important the content (in this case futures ****** signals) are created by my own strategy, so it can be no where else found. I literally have no idea what to do next, i don't want to do major changes because i don't believe the app looks similar to any other app and for the reason that its already in Google Play Store i don't want to do major UI design. We would greatly appreciate any valuable advice from fellow developers in the community to help us navigate this challenge and successfully pass the review
1
1
411
Jan ’25
UITabBarController y psoition issue for iOS 18
I am trying to give bottom padding to tabbar i.e ** tabBarFrame.origin.y = view.frame.height - tabBarHeight - 30** but it is not moving up from bottom, it gets sticked to bottom = 0 and the tabbar content moving up taher than tabbar itself.. Code snippet is - `i override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() let tabBarHeight: CGFloat = 70 // Custom height for the capsule tab bar var tabBarFrame = tabBar.frame tabBarFrame.size.height = tabBarHeight tabBarFrame.size.width = view.frame.width - 40 tabBarFrame.origin.y = view.frame.height - tabBarHeight - 30 tabBarFrame.origin.x = 20 tabBar.frame = tabBarFrame tabBar.layer.cornerRadius = tabBarHeight / 2 tabBar.clipsToBounds = true view.bringSubviewToFront(tabBar) }` Can anyone please help to resolve the issue for iOS 18, it is coming in iOS 18 rest previous versions are fine with the code.
0
0
280
Jan ’25
Guideline 4.3(a) - Design - Spam - automatic rejection
I previously written here, and some advices were to appeal to rejection sending them message describing uniqueness of the app. Nothing is working. In short, i have a vpn app (of course by design shares some concept with other apps that are in the app store). But since the rejection i have completely changed the ui, added built in browser, p2p messenger so users could interact with each other without any interference. The app is completely free with no ads. I thought this is it, there's no way it would reject this time, but... i get a notification with rejection repeating the same old message. I'm extremely frustrated and don't know what to do. Tried changing the logo of the app, the name to "Incognito - Messenger, VPN", app store screenshots. I've already appealed with screenshots describing unique features that other vpn apps don't have, but the message just repeats from app review team. Submission ID: 1a49ee0b-c4e2-4a36-8372-e4d3b9a8b13f Does anybody have an advice what i can do?
3
0
1.5k
Jan ’25
Seeking Developer Insights Regarding 4.3(b) Review Response
We recently received feedback under Guideline 4.3(b) suggesting our app duplicates functionality found in other apps in this category. However, our app is fundamentally not a dating app. It is a conversation facilitator designed to foster meaningful connections for friendships, networking, and shared interests. While romantic connections may occur naturally, they are not the primary focus. Thus, we are seeking insights on this key question: How do developers effectively demonstrate feature differentiation to reviewers? We want to clearly show how our app’s functionality uniquely addresses user needs and provides value beyond existing solutions. Our Core Features: Our app introduces distinct features that differentiate it from traditional apps in this space: Paths: Psychology-based prompts embedded in chats encourage users to explore meaningful topics like values and aspirations. These prompts are dynamically triggered to keep conversations engaging and productive. Aura: A rewards system that incentivizes thoughtful, high-quality engagement by awarding points for meaningful conversations, which can unlock additional features. Spark Matches: Real-time, themed events pair users for structured, 15-minute conversations on topics like technology or travel. Curated prompts ensure the focus is on shared interests, not romance. Flame Matches: AI-personalized matches adapt to user conversations, connecting individuals based on compatibility. Chats begin anonymously, focusing on personalities rather than appearances, and are designed for platonic, professional, or friendship connections. Market Analysis: Our app addresses key gaps in the connection space: No apps embed conversation prompts directly into chats; nor do they trigger them regularly or dynamically, to foster deeper discussions over a sustained period. No apps have rewards systems designed to specifically incentivize meaningful engagement. No apps have matchmaking systems that adapt dynamically based on users’ past conversations. No apps support the combination of real-time, one-on-one themed conversations with curated prompts. Traction: As an incorporated business with over a year of experience, we have helped thousands of users build platonic, professional, and interest-based connections. For example, users in relationships join our events to find new friends, and professionals use Spark Matches to discuss shared interests like technology. Consistent feedback highlights our prompts and structured events as refreshing alternatives to superficial, appearance-driven platforms. Our rapidly growing user base has validated the demand for these features, and we would like to bring this experience natively to them via a mobile app on the App Store. Additional Context: While some basic chat functionality may overlap with existing platforms, our focus is on facilitating meaningful conversations and incentivizing a thoughtful conversation culture that represents a novel approach validated by user research and feedback. We welcome advice from developers who have successfully highlighted their app’s uniqueness when facing similar review challenges. Thank you in advance! :)
2
0
474
Dec ’24
SwiftUI FileDocument: Modify the default save dialog
Is it possible to change the default save dialog that appears when creating a document based MacOS app in SwiftUI? I have a basic FileDocument struct that gets called to a view using a DocumentGroup scene. struct MyFile: FileDocument { static let readableContentTypes: [UTType] = [.myFileType] static let writeableContentTypes: [UTType] = [.myFileType] var list: [String] init(configuration: ReadConfiguration) throws { let data = configuration.file.regularFileContents! let JSONDecoder = JSONDecoder() do { try list = JSONDecoder.decode([String].self, from: data) } catch { throw CocoaError(.fileReadCorruptFile) } } func fileWrapper(configuration: WriteConfiguration) throws -> FileWrapper { let JSONEncoder = JSONEncoder() JSONEncoder.outputFormatting = .prettyPrinted do { data = try JSONEncoder.encode(self.list) } catch { print(error.localizedDescription) throw CocoaError(.fileWriteUnknown) } return .init(regularFileWithContents: data) } } This gets called at the DocumentGroup DocumentGroup(newDocument: MyFile(), editor: { document in ContentView(document: document.$document) }) But when I save the file, I want the save dialog that appears to have something like a 'Tags' textField that can also store information about the file. Something similar to this: (https://i.sstatic.net/AJQ3YNb8.png) From what I can find, there isn't much information about this other than manually creating an NSSavePanel class and overriding the current save function
1
0
399
Dec ’24
Some colors are missing during first app launch
Recently I decided to download my app from the App Store and found out that during the first launch some colors were missing or displayed incorreclty. For example one button was blue, although switching dark mode on and off solved button color it. Some colors were completely missing and the tab bar buttons were blue as well. Any advices? I'm using iOS 18.2 and XCode 16.1
1
0
307
Dec ’24
SwiftUI: How to create different background colors for List sections?
I'm trying to achieve a specific UI design in SwiftUI where the bottom section of my List has a different background color than the top section. For example in the Medications portion of the Health app, the "Your Medications" Section has a different background than the top "Log" Section. How do I achieve this?: Here some example code. I wonder if I am supposed to use two Lists instead. If I use two Lists though and nest it in a ScrollView, the height of the lists needs to be specified. I am working with dynamic content, though so I don't think that is ideal. class ProtocolMedication {} // Example model struct HomeView: View { @Query private var protocolMedications: [ProtocolMedication] var body: some View { NavigationStack { List { // Upper sections with default background Section { Text("Content 1") } header: { Text("Log") } // Bottom section that needs different background Section { ForEach(protocolMedications) { medication in Text(medication.name) } } header: { Text("Your Medications") } } .listStyle(.insetGrouped) } } }
1
0
581
Dec ’24