Hi,
I would like to make an educational app for helping my students to learn about malaria diagnosis and need to put some animal icon.
In the tabview, is it possible to use system images like monkey, bird, mouse. I cannot see these animals in SF symbol list.
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.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am an iOS app developer and I have a question regarding the implementation of an exit button in an iOS app. I remember reading in the past that Apple does not recommend this practice, but I couldn’t find any explicit policy on this matter in the current Human Interface Guidelines.
Could you please clarify whether it is acceptable to implement an exit button in an iOS app according to the latest guidelines? Any references or official documentation would be greatly appreciated.
Will the draw (animation) functionality of SF Symbols be available when symbols are cut/pasted into a Keynote presentation? Better yet, will the draw tools from SF Symbols 7 be available in Keynote for objects created in Keynote?
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)
}
}
}
}
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?
support destinations have no Apple Watch, I tried delete the watch App target and recreate watch App for Existing app, but if is unuseful
Hello there,
I have a couple of question about Apple Pay guidelines:
• if we offer Apple Pay payment method in our app, can we disable the selection (I mean the method selection NOT the Payment button!) IF certain condition happens? E.g. the user cannot select apple pay payment method because our basket is not ready yet.
• Are we forced to move the apple pay payment method on the top of our selection? E.g. Cards, Cash On Delivery, Coupon, Apple Pay --> Apple Pay, Cards, Cash On Delivery, Coupon
One last technical question:
• when we start the payment process we are gonna create the request and present the sheet BUT we have to call our backend for pre-authorization, is it allowed?
@objc private func applePayButtonTapped(sender: UIButton) {
// TODO: Is it allowed?
// We need to ask to our backend a pre-authorization and THEN procced with Apple Pay flow
// but this could be done ONLY after the user TAP on BUY with APPLE PAY and BEFORE
// paymentAuthorizationViewController is called.
// Are we compliant to do that?
if PKPaymentAuthorizationViewController.canMakePayments(usingNetworks: FakeData.paymentInfo()) {
let request = PKPaymentRequest()
request.blablabla = blabla
let authorizationViewController = PKPaymentAuthorizationViewController(paymentRequest: request)
if let viewController = authorizationViewController {
viewController.delegate = self
present(viewController, animated: true, completion: nil)
}
}
}
Thanks in advance :)
My application suddenly started crashing on launch when I target "My Mac - designed for iPad." But only after the first build from scratch, which runs once. All subsequent runs crash with:
dyld[90869]: Symbol not found: _OBJC_CLASS_$_AVPlayerView
Referenced from: <D566512D-CAB4-3EA6-9B87-DBD15C6E71B3> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Debugger/libViewDebuggerSupport.dylib
Expected in: <4C34313C-03AD-32EB-8722-8A77C64AB959> /System/iOSSupport/System/Library/Frameworks/AVKit.framework/Versions/A/AVKit
I don't use AVPlayerView anywhere in my application. A file-contents search of the entire source tree doesn't turn it up either. The application doesn't even get to the point of instantiating the app object, so none of my code is involved.
If I switch the target to my iPhone, it will build and run repeatedly. If I then switch back to "My Mac," it will build and run once... and then crash every time.
Further research shows that this only happens in Debug builds.
This is a major issue right now because iOS 18 broke authentication certificates (thus HTTPS), so anyone writing or debugging an app that needs network functionality must use HTTP on localhost. In my case, I'm dead in the water because I can't debug on my local machine.
Has anyone seen something like this before? I can find no reference to anything like it.
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 ?
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!
Hello,
Im new to Xcode, ive been taking some classes and watching YouTube videos as well as using AI. Im having an issue I cannot find a video on, and AI just keeps screwing up my layout and sizing.
Here is the issue, I have a Custom Made Image for my Sign In button, for my log in page on Xcode. The issue being that I can barely see the button and when I go to adjust the size the whole layout gets screwed up. My Logo Image (supposed to take up the top 50% of the screen) takes over the whole Botton of the screen and I loose my username and password Text threads and images. I guess my question is, is this an issue with the size of image ive uploaded or is this an issue with my code? I changed the size of the Image I created in Canva to 900pixles for the width and 300pixals for the height and that did absolutely nothing to my image in Xcode.
Below is the Button and Create Account section in my code that seems to be having issues. Ppppplease help me.
var body: some View {
NavigationStack(path: $navigationPath) {
ZStack {
// Background image
Image("Background1")
.resizable()
.scaledToFill()
.ignoresSafeArea()
.clipped()
// Main content
ScrollView {
VStack(spacing: 20) {
// Logo
Image("DynastyStatDropLogo")
.resizable()
.scaledToFit()
.padding(.top, -160)
.padding(.bottom, -30)
// Form elements
// Username field
ZStack {
Image("UsernameBar")
.resizable()
.aspectRatio(contentMode: .fill)
.padding()
TextField("UserName:", text: $textInput)
.padding(.horizontal, 75)
.background(Color.clear)
.foregroundColor(.red)
.focused($focus, equals: .username)
.submitLabel(.next)
.onSubmit {
focus = .password
}
}
.frame(height: 50)
.clipShape(RoundedRectangle(cornerRadius: 10))
.padding(.horizontal)
// Password field and Forgot Password link
VStack(spacing: 20) {
ZStack {
Image("PasswordBar")
.resizable()
.aspectRatio(contentMode: .fill)
.padding()
SecureField("Password:", text: $textInput2)
.padding(.horizontal, 75)
.background(Color.clear)
.foregroundColor(.red)
.focused($focus, equals: .password)
.submitLabel(.go)
.onSubmit {
submitForm()
}
}
.frame(height: 50)
.clipShape(RoundedRectangle(cornerRadius: 10))
.padding(.horizontal)
// Forgot Password link (right-aligned)
HStack {
Spacer()
Text("Forgot Password?")
.foregroundColor(.blue)
.onTapGesture {
navigationPath.append("passwordRecovery")
}
}
.padding(.horizontal, 90)
}
Spacer(minLength: -110)
// SignIn Button - Explicitly showing it
HStack {
Spacer()
Button {
submitForm()
} label: {
Image("signinButton")
.resizable()
.frame(width: 500, height: 400)
}
Spacer()
}
Spacer(minLength: -300)
// Create Account (centered)
HStack {
Spacer()
Text("Create Account")
.foregroundColor(.blue)
.onTapGesture {
navigationPath.append("accountCreation")
}
Spacer()
}
.padding(.bottom, -10)
}
}
}
.onAppear {
focus = .username
}
.navigationDestination(for: String.self) { destination in
switch destination {
case "dashboard":
DSDDashboard()
case "passwordRecovery":
PasswordRecoveryView()
case "accountCreation":
AccountCreationView()
default:
EmptyView()
}
}
.alert(isPresented: $showAlert) {
Alert(
title: Text("Missing Information"),
message: Text("Enter UserName and Password to continue to DSD"),
dismissButton: .default(Text("OK"))
)
}
}
}
// Function to handle form submission
func submitForm() {
focus = nil
if textInput.isEmpty || textInput2.isEmpty {
showAlert = true
} else {
print("Login with username: \(textInput), password: \(textInput2)")
navigationPath.append("dashboard")
}
}
// Enum to manage focus states
enum FormFieldFocus: Hashable {
case username, password
}
}
Hi, I'm trying to create a visualization using charts for vision pro. I want to create a line chart that connects pair of points on a donut chart. So i'm trying to draw the lines radially but it seems that the line chart always has only the bottom left corner of the view as origin. How can I tranform the origin to center of the view?
Hi,
I am trying to create a custom SF Symbol from an SVG file created with Affinity Designer but, even though my SVG file look perfect in Firefox for example compared to the exported custom.circle.svg file (as recommended in Apple's documentation), I fail to get rid of this error:
"The provided variants are not interpolatable"
My creation process using Affinity Designer is:
Export as SVG file
Duplicate the custom.circle.svg file exported from the SF Symbols app
In the new file, replace the 3 "path" tags in the "g" sections "id="Black-S", "Regular-S", "Ultralight-S" with the paths from the SVG file exported from Affinity designer
Set the 3 transform matrices to "matrix(1 0 0 1 0 0)" for the 3 variants to be generated at the correct location.
Verify in an SVG viewer that the file looks correct.
Import the file via Drag&Drop into the SF Symbols app.
What is wrong with my file?
Thank you in advance for any help,
Marc
mySymbol.svg.txt
When we are going to have a real analog clock option on the lock screen. If an apple watch can do it surely its not that difficult. For someone who uses a clock to tell what time it isn't as opposed to what time it is, i’m constantly having to convert a digital image where the image of hands on a dial is so much easier. Surely this isnt because someone has forgotten how to read a clock
Below is the sample css code where I render a web page in my webview screens fonts became too small after 18.4 and its so hard to read when I launch my app . Any workarounds to address this issue
.sg-labels-canvas {
font-size: 15px;
display: flex;
flex-direction: column;
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Roboto, sans-serif;
font-style: normal;
}
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>
How do I import a Reality Composer project into Blender (Windows x86_64)
When I first tried to create a custom SF Symbol using Affinity Designer, I encountered difficulties because of two problems which have cumulated:
SVG files created by Affinity Designer cannot be directly imported into the SF Symbols app because Affinity Designer totally recreates the content of tag <g id="Notes">, making so the file incompatible for later import into the SF Symbols app. So I had to manually fix that tag via a text editor in order to make the file compatible with the SF Symbols app.
Because I was so focused on fixing manually the SVG file, I did not see that the actual content of my SVG file did not follow all Apple recommendations. As a consequence, I have posted this question on the forum:
Struggling creating a custom SF Symbol: The provided variants are not interpolatable
Finally I have found a way to create an SVG file compatible with SF Symbols using Affinity Designer, meeting the Apple recommendations, and at last perfectly suitable for further use in Xcode.
You will find the solution in my reply to this post below which is actually a quasi copy/paste of my final own reply to my original post.
Marc
Hi there,
I'm working on a product which needs to pair with an iOS device (only iPad and iPhone) via Bluetooth. I already have the device pairing and operating fully with android or Windows hosts and have implemented BLE. Obviously, iOS isn't as simple as those for pairing. The product type is not listed under the MFi accessories.
The question I have is what hardware and or firmware needs does the product needs to fulfil in order to pair/bond fully. I've seen some devices have a MFi security chip, some need to be manufactured in a MFi approved facility, I've no idea on the firmware requirements. We're starting the process of joining the MFi program too. So:
Do I need the security chip?
Where is the pairing process documented?
Can I use BLE or do I need to use classic Bluetooth or core Bluetooth?
Any help would be greatly appreciated because I'm kind of lost.
Thanks, Louis
In Carplay, is it possible to update the navigation title and also add right tab bar items? Couldn't find these details in the documentation. Please suggest