Hi,
I know its a simple thing, but I cannot figure it out.
I have a list of items going to another view using NavigationStack. Everything seems fine, but when I go into the list, I have two back buttons, the title is shifted down, and its just annoying.
Thanks for the help.
Here's my code:
struct ImportantNumbers: View {
var body: some View {
NavigationStack {
List(INDDataService.getAll(), id: \.id) { data in
NavigationLink(value: data)
{
HStack {
Image(systemName: "circle.fill")
.foregroundColor(.green)
Text(data.name)
.fontWeight(.bold)
.navigationTitle("Important U.S. ADA Numbers")
.navigationBarTitleDisplayMode(.inline)
}
.navigationDestination(for: INDData.self) { data in
Spacer()
Image(data.logo)
.resizable()
.frame(width: 200, height: 200)
Spacer()
Text(data.phone)
.font(.system(size: 30, weight: .bold, design: .rounded))
Spacer()
.navigationTitle(data.name)
}
}
}
}
}
}
struct ImportantNumbers_Previews: PreviewProvider {
static var previews: some View {
ImportantNumbers()
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,
I've revised some apps that work on WatchOS via iOS. The WatchOS app works fine in the simulator, but when I try and run it on an actual watch, it either crashes immediately or shows a blank screen.
I've enabled developer's mode.
Is anyone else having issues?
Thanks,
Dan Uff
Hi,
I'd like to work on adding support for an app for the Vision Pro, but am unable to install the simulator. Xcode tries to install it but comes up with a blank error box.
When I try and manually add it in the Devices & Simulators section, the Vision Pro isn't listed.
Is anyone else having this problem?
Xcode
Version 15.0.1 (15A507)
Thanks,
Dan Uff
Hi, I am receiving the above error after trying to upload it to the App Store.
I would know what to do IF Xcode would provide WHICH file is corrupt.
The error reads:
ITMS-90013: Corrupt Image File - The image file $[IconName] appears to be corrupt.
Again, I would know what to do if I had more information about which file(s) to fix.
Could anyone FROM APPLE help me or give me a hint?
Thanks, Dan Uff
Hi,
Lately, I've been getting the same window each time I install an app for testing. Anyone else?
Hi all,
I have WeatherKit working on iOS and watchOS, but am having problems getting it to work on macOS. I have all entitlements enabled and everything seems to checkout, but I get the following error:
"WARNING: error = 3→(76) INVALID_PERSONA; It is undefined behavior to look up a container with a persona other than personal or data separated. Please adopt a persona first. Assuming personal. given persona = (<MCMUserIdentity: 0xb3d0288c0; posixUser = (501|20|danuff|/Users/danuff), identifier = 501, personaType = unspecific, personaUniqueString = E90578C5-AAE4-44DD-9E41-CC3F97B34F0C, kernelPersonaID = 1001>)
Message from debugger: killed
Any ideas?
Hi,
I'm trying to make a small text editor. Everything works except I need the background a different color.
But the standard way to do it with 'ZStack' doesn't work? Any ideas?
Thanks!
ZStack {
Color.green
.ignoresSafeArea()
NavigationView {
TextEditor(text: $text)
.background(Color.clear)
.navigationTitle("Notepad Test!")
}
}
}
Can we submit apps with the RC version of Xcode or wait for the GM?
Thanks,
Dan
Hi,
I am using the RC version of Xcode and get the following error while submitting to the App Store. I tried using the otool bit it didn't work. I
have attached a screen shot of the actual error. Have any ideas?
Thanks,
Dan Uff
Hi,
I have several iOS apps in the App Store. I have been asked to provide a Mac app for some of them, which I am willing to do.
Should I add the Mac app to an existing iOS app (i.e. a new target) or make a separate app just for the Mac, even though the information inside the app would be the same?
Thanks,
Dan Uff
Could someone help me find the example code for WeatherKit that is associated with the video? Thanks.
Hi,
I'm trying to run.a project in Xcode 14 and I keep getting this warning::
warning build: Skipping duplicate build file in Copy Bundle Resources build phase: /Users/danuff/Documents/CPS/CPS-iOS/iOS 16/Projects (Current)/iPhone : iPad/SwiftUI/General/CAI/CAI/Databases/Phone List Data/JSON Data/UKPhoneNumbersList.json
and the project won't run. How can I resolve this?
Thanks,
Dan Uff
P.S. If this is in the wrong forum, I tried to find the Beta one but couldn't. Thanks.
Hi,
I'm in the process of writing my first Mac Menu Bar app. I must include a way to quit the app by the normal [Command+Q] option. I got the below code from a YouTube video and it works on the video, but not in my app. I am also using SwiftUI.
The code's filename is ApplicationMenu.swift and is written in Swift. According to the video (which I cannot include in this message) the below example shows the menu appearing at the bottom of the window, but when I do it, it doesn't show up.
Thank you.
Here's the code:
import SwiftUI
class ApplicationMenus: NSObject
{
let menu = NSMenu()
func createMenu() -> NSMenu
{
let clockView = ActualClock()
let topView = NSHostingController(rootView: clockView)
topView.view.frame.size = CGSize(width: 255, height: 255)
let customMenuItem = NSMenuItem()
customMenuItem.view = topView.view
menu.addItem(customMenuItem)
menu.addItem(NSMenuItem.separator())
let aboutMenuItem = NSMenuItem(title: "About",
action: #selector(about),
keyEquivalent: "")
aboutMenuItem.target = self
menu.addItem(aboutMenuItem)
return menu
}
@objc func about(sender: NSMenuItem)
{
NSApp.orderFrontStandardAboutPanel()
}
@objc func support(sender: NSMenuItem)
{
NSApp.orderFrontStandardAboutPanel()
}
}
Hi,
Will the Apple Weather framework work on Mac using SwiftUI? The documentation doesn't say MacOS.
Thanks,
Dan Uff
Hi,
This is my first time using a list with different sections. I am using an example from a documented video that I found on the Internet.
I'm getting some weird results. Could someone point me in the right direction?
Here's the code:
import Foundation
struct History: Identifiable, Hashable
{
var id = UUID()
var hist: String
}
struct Titles: Identifiable, Hashable
{
var id = UUID()
var Titl: String
}
struct Library: Identifiable, Hashable
{
var id = UUID()
var lib: String
}
// Main Menu Options:
var commandsA: [History] = [History(hist: "History"),
History(hist: "Overview")]
var commandsB: [Titles] = [Titles(Titl: "Title 1: Employment"),
Titles(Titl: "Title 2: Public Service" ),
Titles(Titl: "Title 3: Public Accommidations"),
Titles(Titl: "Title 4: Telecommunication"),
Titles(Titl: "Title 5: Miscellous")]
var commandsC: [Library] = [Library(lib: "2010 Accessibilty Standards"),
Library(lib: "2008 ADA Amendments"),
Library(lib: "Phone Numbers"),
Library(lib: "More Information")]
struct MainMenu160: View {
@State private var path = NavigationPath()
var body: some View {
NavigationStack(path: $path) {
List {
Section(header: Text("Overview")) {
ForEach(commandsA) { secA in
HStack {
Image(systemName: "folder")
Text("\(secA.hist)")
}.font(.system(size: 20, weight: .bold, design: .rounded))
}
}
}
List {
Section(header: Text("Titles:")) {
ForEach(commandsB) { secB in
HStack {
Image(systemName: "folder")
Text("\(secB.Titl)")
}.font(.system(size: 20, weight: .bold, design: .rounded))
}
}
}
List {
Section(header: Text("Library:")) {
ForEach(commandsC) { secC in
HStack {
Image(systemName: "folder")
Text("\(secC.lib)")
}.font(.system(size: 20, weight: .bold, design: .rounded))
}
}
}.navigationTitle("ADA 1990")
.navigationBarTitleDisplayMode(.automatic)
}
}
struct MainMenu160_Previews: PreviewProvider {
static var previews: some View {
MainMenu160()
}
}
}
And here's the output: