The format of photos on the new iOS 18 and its updates is HORRIBLE. Not userfriendly, not easy to navigate, not even appealing to the eye. I can’t even see my favorites album anymore and have to search for it every time. In short, I hate it. Well done Apple
General
RSS for tagExplore 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
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
My newly released App Snapshot-Chess-Move, #1592848671, is not creating a public database of chess moves as I expect. What steps do I need to do inorder for my App to be using a public database. It appears as if each of my iOS devices, iPhone, iPad and Mac mini each have a private database of chess moves. When I change my data on the iPad, I expect the new data to appear (with slight delays) on the Mac.. I do not know what to do next. Please help me. This was working in Development mode but not in Production when I submitted my App for release.
UPDATE:
The cloud data is copied locally to a @Quary variable and updated by using .insert, .delete and .save commands. So, I deleted and re-downloaded my apps on each device, iPad, iPhone, and Mac and obtained the same cloud data. So how do users get the most recent copy of the cloud. Do they need to delete their App and start over? Is there a .update command that can do this updating for me? Also, I pushed the App out of the background and restarted the App to obtain the updated cloud data.
hi, i have an objc ipad application that use xib with zooming for adapt to the screen (until ios18) but with ipad os 26 will be displayed wrong
support destinations have no Apple Watch, I tried delete the watch App target and recreate watch App for Existing app, but if is unuseful
I have come quite far with my first app and have various picker lists working well. However, I am stuck thinking through how to do this next picker.
My data model has Golf Course name and Tee. For each golf course there are multiple Tees and not all the same across the Courses.
Example of Data
CourseA RedTee
CourseA GreenTee
CourseA BlueTee
CouseB RedTee
CourseB YellowTee
CourseB WhiteTee
I first give the client the ability to Pick a Course from a picker list. That works fine.
Now I want to create a Picker list of Tees but only for that selected Course.
So if the client selected CourseB they would be presented with these Tees to select from
RedTee
YellowTee
WhiteTee
How do I limit the second picker to only show the Tees for the selected Course?
Then in an associated question, once i have the Course and the Tee, I want to Auto fill the rest of a form with Slope, Rating and Yardage.
@Model
class ScorecardData {
var scorecardcourseName: String
var scorecardTee: String
var scorecardSlope: Double
var scorecardRating: Double
var scorecardYardage: Int
Here is my code for the Course Picker List
Picker("", selection: $selectedCourse) {
Text("Select a Course").tag(" ")
ForEach(courses, id: \.self) { course in
Text(course.courseName)
.tag(course.courseName)
}
}
.onChange(of: selectedCourse) {
if(selectedCourse != nil) {
roundsdata.roundscourseName = selectedCourse!
}
}
Here is my current Picker list but its pulling all Tees for all Courses
Picker("", selection: $selectedTee) {
Text("Select Tee").tag(" ")
ForEach (tees, id: \.self) { tee in
Text(tee.scorecardTee)
.tag(tee.scorecardTee)
}
}
.onChange(of: selectedTee) {
if(selectedTee != nil) {
roundsdata.roundsTee = selectedTee!
}
}
My @State and @Query statements are as follows in case there is a change there that is needed as well,
@State private var selectedTee: String? = "Select Tee"
@Query(sort: \ScorecardData.scorecardcourseName) private var tees: [ScorecardData]
@State private var selectedCourse: String? = "Select Course"
@Query(sort: \CourseData.courseName) private var courses: [CourseData]
How do I import a Reality Composer project into Blender (Windows x86_64)
Hi,
I have a view that should do the following:
Set up and confirm a passcode upon account creation.
Verify passcode if signing in.
Reset passcode if prompted.
With the code below, functions 1 and 2 are working. However, I'm having an issue with function 3. I am able to declare the reset UserDefault on a previous view so that the proper logic occurs, which is to read in the input, and then confirm it. However, it is not working as intended. In this code here:
else if reset {
UserDefaults.standard.set(passcode, forKey: "new-passcode")
UserDefaults.standard.set(false, forKey: "reset-passcode")
passcode = ""
}
I store the new passcode, set reset to false, and clear the passcode so it can be entered again to confirm. The code does not run as intended however. The title does not change and I'm unsure if it is actually storing the passcode. And, when re-entering, it does not change the view as it should by setting view = .someView. I'm assuming there is just flaw in my logic but I'm not sure how to resolve this. Below is the full code. Please let me know if any further clarification is needed.
struct EnterPasscode: View {
@State var title = ""
@State var passcode = ""
@State var message = ""
@State var buttonState = false
@Binding var view: Views
var body: some View {
Group {
Spacer()
.frame(height: 50)
Text(title)
.font(.system(size: 36))
.multilineTextAlignment(.center)
.frame(height: 50)
Spacer()
if passcode != "" {
Text("\(passcode)")
.font(.system(size: 24))
.frame(height: 25)
} else {
Spacer()
.frame(height: 25)
}
Spacer()
.frame(height: 50)
PasscodeKeypad(passcode: $passcode)
Spacer()
if message != "" {
Text(message)
.frame(height: 25)
.foregroundStyle(Color.red)
} else {
Spacer()
.frame(height: 25)
}
Spacer()
WideButton(text: "Continue", buttonFunction: .functional, openView: .enterPasscode, view: .constant(.enterPasscode), buttonState: $buttonState)
.onChange(of: buttonState) { oldState, newState in
if buttonState {
let passcodeSet = UserDefaults.standard.bool(forKey: "passcode-set")
let storedPasscode = UserDefaults.standard.string(forKey: "passcode")
let reset = UserDefaults.standard.bool(forKey: "passcode-reset")
let newPasscode = UserDefaults.standard.string(forKey: "new-passcode")
print(reset)
if passcode.count == 4 {
if storedPasscode == nil {
if newPasscode == nil {
UserDefaults.standard.set(passcode, forKey: "new-passcode")
passcode = ""
} else if passcode == newPasscode {
UserDefaults.standard.set(passcode, forKey: "passcode")
UserDefaults.standard.set(true, forKey: "passcode-set")
view = .someView
}
} else if reset {
UserDefaults.standard.set(passcode, forKey: "new-passcode")
UserDefaults.standard.set(false, forKey: "reset-passcode")
passcode = ""
} else if newPasscode != nil {
if passcode == newPasscode {
UserDefaults.standard.set(passcode, forKey: "passcode")
view = .someView
}
}
}
checkPasscodeStatus()
buttonState = false
}
}
Spacer()
if !UserDefaults.standard.bool(forKey: "passcode-reset") && UserDefaults.standard.bool(forKey: "passcode-set") {
Button(action: {
view = .verifyPhone
}) {
Text("Forgot passcode?")
.foregroundStyle(.black)
}
}
Spacer()
.frame(height: 25)
}
.onAppear() {
checkPasscodeStatus()
}
.frame(width: UIScreen.main.bounds.width - 50)
}
func checkPasscodeStatus() {
let passcodeSet = UserDefaults.standard.bool(forKey: "passcode-set")
let storedPasscode = UserDefaults.standard.string(forKey: "passcode")
let reset = UserDefaults.standard.bool(forKey: "passcode-reset")
if reset {
title = "Enter new passcode"
} else if passcodeSet {
title = "Enter Passcode"
} else if storedPasscode != nil && storedPasscode != "" {
title = "Confirm Passcode"
} else {
title = "Select a 4 Digit Passcode"
}
}
}
struct WideButton: View {
@State var text: String
@State var buttonFunction: ButtonType
@State var openView: Views?
@Binding var view: Views
@Binding var buttonState: Bool
var body: some View {
Button(action: {
buttonPressed()
}, label: {
ZStack {
RoundedRectangle(cornerRadius: 5)
.fill(Color.black)
.frame(width: UIScreen.main.bounds.width - 50, height: 50)
Text(text)
.foregroundColor(.white)
}
})
}
func buttonPressed() {
switch buttonFunction {
case .openView: view = openView!
case .functional: buttonState = true
}
}
}
enum ButtonType {
case openView
case functional
}
I am creating a shooting game which uses Game Center for multiplayer and I want to make the Matchmaker view look different. How can I do that?
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?
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.
Prior to iOS 18 I could interact with my touchscreen when my phone was in standby mode. This was perfect because I could check weather, time, date, pause and play music, change songs, all at my desk, all without picking up my phone from the wireless charger. This feature is now gone in iOS 18 and I would REALLY like it back. It was super useful all day at work and now I’m constantly fumbling with my phone for every little thing.
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.
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)?
Hello everyone! The Swift Student Challenge officially starts tomorrow (February 3rd), and I have a question. Am I allowed to use tools like Photoshop to create artwork for my project? I’d appreciate any clarification. Thanks in advance!
In the past, we had a red badge without a number on the app icon. We want to bring it back. Please provide instructions.
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.
The bane of my existence has been designing interfaces where the whole view needs to scroll, but a portion is a List and the other portion is static.
I run into this problem time and again so I was hoping someone has a good solution because we all know that embedding a List view inside ScrollView is a no-go within SwiftUI. It simply doesn't work.
So what is a best practice when you need the whole screen to scroll, but a portion is a List? Use a navigation stack instead of a ScrollView? What if it's a child view of a navigation stack already?
The most recent update included coloured icons for grouping of emails
anybody previously needing to group emails we’re able to achieve this alphabetically by simply searching for what you were looking for.
These icons clutter the page with totally unnecessary screen pollution.
if you want to persist with this folly can you please provide a classic display option for those of us who have happily survived using email for 30 years without this fluff.
I created a data structure based on a dictionary of words. The purpose is to link each word to all other words made up of the same letters plus one.
Example: table -> ablate, cablet, tabled, gablet, albeit, albite, etc.
For this I built a data model made of three entities: Word, Draw, Link.
A Draw is a set of letters corresponding to a Word and sorted in alphabetic order, like : HOUSE -> EHOSU. A Link is a letter that you add to a Draw to get another Draw.
So my data model looks like this:
And here is how I implemented it in Xcode:
Entity Word
(let's forget the attribute optComp that plays no role here)
Entity Draw
Entity Link
I am populating the data in two steps:
first I read a list of words from a .txt source and I populate the Word entity and at the same time the Draw entity with the corresponding relationship (function loadDic())
This first step apparently works fine. I can easily find all anagrams of any word with something like word.sort.word.spelling
I read through the Draw entity. For each draw I seek all existing +1 draws considering each letter of the alphabet. If there are, I create a Link and add the relationships (function createLinks())
Here is where something goes wrong. If the Link's and the relationship Draw.plus seem to be correctly created, the other relationship Link.gives is only partially populated, say 50%.
Moreover, I tried to apply an additional routine (updateLinks()) , focusing only on Link's with an empty Link.gives relationship and updating them. But again, only 50% of the nil relationships appear to be populated.
I could not find out why those relationships are not properly populated. If someone can help me out I would be grateful.
Here is the code:
LoadDic() function (OK) :
func loadDic() {
print("Loading dictionary...")
dataAlreadyLoaded.toggle()
guard let url = Bundle.main.url(forResource: INPUT_FILE, withExtension: "txt") else {
fatalError("\(INPUT_FILE).txt not found")
}
if let dico = try? String(contentsOf: url, encoding: String.Encoding.utf8 ) {
let lines = dico.split(separator: "\r\n")
for line in lines {
let lineArray = line.split(separator: " ")
print("\(lineArray[0])") // word
let wordSorted = String(lineArray[0].sorted())
let draw = getDraw(drawLetters: wordSorted) ?? addDraw(drawLetters: wordSorted) // look if draw already exists, otherwise create new one.
let wordItem = Word(context: viewContext) // create word entry with to-one-relationship to draw
wordItem.spelling = String(lineArray[0])
wordItem.optComp = (Int(String(lineArray[1])) == 1)
wordItem.sort = draw
do {
try viewContext.save()
} catch {
print("Errort saving ods9: \(error)")
}
}
}
print("Ods Chargé")
}
func addDraw(drawLetters: String) -> Draw {
let newDraw = Draw(context: viewContext)
newDraw.draw = drawLetters
return(newDraw)
}
func getDraw(drawLetters: String) -> Draw? {
let request: NSFetchRequest<Draw> = Draw.fetchRequest()
request.entity = Draw.entity()
request.predicate = NSPredicate(format: "draw == %@", drawLetters)
do {
let drw = try viewContext.fetch(request)
return drw.isEmpty ? nil : drw[0]
} catch {
print("Erreur recherche Tirage")
return nil
}
}
createLinks() function (NOK):
func createLinks() {
var erreur = " fetch request <Draw>"
let request: NSFetchRequest<Draw> = Draw.fetchRequest()
request.entity = Draw.entity()
request.predicate = NSPredicate(value: true)
print("Building relationships...")
do {
let draws = try viewContext.fetch(request)
count = draws.count
for draw in draws {
print("\(count) - \(draw.draw!)")
linkTable.removeAll()
for letter in ALPHABET {
print(letter)
let drawLettersPlus = String((draw.draw! + String(letter)).sorted()) // draw with one more letter
if let drawPlus = draws.first(where: { $0.draw == drawLettersPlus }) { // look for Draw entity that matches augmented draw
let linkItem = Link(context: viewContext) // if found, create new link based on letter with relationship to augmented draw
linkItem.letter = String(letter)
linkItem.gives = drawPlus
erreur = " saving \(draw.draw!) + \(letter)"
try viewContext.save()
linkTable.append(linkItem) // saves link to populate the one-to-many relationship of the initial draw, once the alphabet is through
}
}
let drawUpdate = draw as NSManagedObject // populate the one-to-many relationship of the initial draw
let linkSet = Set(linkTable) as NSSet
drawUpdate.setValue(linkSet, forKey: "plus")
erreur = " saving \(draw.draw!) links plus"
try viewContext.save()
count -= 1 // next draw
}
} catch {
print("Error " + erreur)
}
print("Graph completed")
}
updateLinks function (NOK):
func updateLinks() {
var erreur = "fetch request <Link>"
let request: NSFetchRequest<Link> = Link.fetchRequest()
request.entity = Link.entity()
print("Running patch...")
do {
request.predicate = NSPredicate(format: "gives == nil")
let links = try viewContext.fetch(request)
for link in links {
let baseDraw = link.back!.draw!
print("\(baseDraw) \(link.letter!)")
let augmDrawLetters = String((baseDraw + link.letter!).sorted())
if let augmDraw = getDraw(drawLetters: augmDrawLetters) {
viewContext.perform {
let updateLink = link as NSManagedObject
updateLink.setValue(augmDraw, forKey: "gives")
erreur = " saving \(augmDraw.draw!) \(link.letter!)"
do {
try viewContext.save()
} catch {
print("Erreur mise à jour lien")
}
}
}
}
} catch {
print("Error " + erreur)
}
}
RESULT
And this is the output showing the content of the Draw entity with relationships after createLinks() is applied:
And here after updateLinks() is applied :