So basically I can tell that the images are being saved by the system (it shows it on the debug terminal) however whenever I close, and then reopen the app the images firstly aren't there at all but also whenever I search the address name I saved them as... I have tried diagonsing the problem by changing UUID's, changing PNGs to JPGS - no matter what I do it does not show once the application has closed. I think it might have to do with how the image are .HEIF (apple's standard) but I don't have any concrete evidence to back this up. If anyone can help it would be greatly apperciated. import SwiftUI import MapKit import CoreLocation struct ContentView: View { @StateObject private var mapAPI = MapAPI() @State private var text = @State private var locationInfo: String = @State private var showLocationInfo = false @State private var imageUrls = [String]() // Array to store image URLs @State private var showImagePicker = false @State private var showCamera = false @State private var selectedImage: UIImage? @Sta
Search results for
column
2,050 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I'm experimenting with the relatively new (to me) compact DatePicker. I'd like a column of aligned fields, the first two on top are date pickers for user input, the ones below that are dates outputted in textfields calculated from dates input by user. In Interface Builder in Xcode, it looks mostly like I want it, black text centered in white rectangular text fields. But in production on my iPhone, the DatePickers are functional, but they are not centered and they appear on a gray background. I haven't been able to figure out what settings to adjust to make the DatePicker's date centered and on white background. Screenshots attached. Grateful for help. --JS
I found another way to do what I wanted. I just replaced let world: GridWorld = loadGridWorld(named: z) by: let world = GridWorld(columns: x, rows: y)
Topic:
Developer Tools & Services
SubTopic:
Swift Playground
Tags:
Hello, Very recently, the following code has automatically appeared at the bottom of three of my SwiftUI View files: @available(iOS 17.0, macOS 14.0, tvOS 17.0, visionOS 1.0, watchOS 10.0, *) struct $s10Accent_Ace33_0BADA584A03144EFDAB57154E6FD3FBALl7PreviewfMf_15PreviewRegistryfMu_: DeveloperToolsSupport.PreviewRegistry { static let fileID: String = Accent_Ace/HistoryView.swift static let line: Int = 47 static let column: Int = 1 static func makePreview() throws -> DeveloperToolsSupport.Preview { DeveloperToolsSupport.Preview { let randomWord1 = FetchWord.getRandomWord() let randomWord2 = FetchWord.getRandomWord() @State var randomWords = [Word(word: randomWord1.0, IPA: randomWord1.1, lineNumber: randomWord1.2), Word(word: randomWord2.0, IPA: randomWord2.1, lineNumber: randomWord2.2)] HistoryView(words: $randomWords) } } } This is from one of my files but it's very similar in the other two. It seems to have something to do with my previews. The problem is that this code generates an error: Ambigu
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Swift Playground
Swift Student Challenge
Xcode Previews
SwiftUI
I have an iPhone 11 (MWJE2LL/A) for personal and development use. When I upgraded it to iOS 17.2.1 it stopped sync'ing to my computers. I can't sync or restore the iPhone. Both Finder and Music show the iPhone in the left column, but time out after 60 secs of Loading..., finally stating: The selected device could not be found. Xcode also does not see the connected iPhone, and does not list it in the available iOS build destinations. I have tried sync'ing using numerous Apple USB cables and computers (Mac Pro, 16 MacBook Pro, Mac Studio) all running macOS Sonoma 14.1. Is this a known bug in iOS 17.2? Is there a workaround so I can restore the iPhone and continue development work?
Claude31, Exactly. In the application, the user will answer some questions and according to their answer, a certain column X row will be filled with information. Like this: The cell (col X row) to be filled depends on the user's response The content will be text, a string. You can restart the app at any time, when previously used cells must be cleaned.
Topic:
Programming Languages
SubTopic:
Swift
Tags:
Hello, I'm developing an app for Mac, Xcode 15.1, with Swift 5. I need to create a visual matrix, whose elements will be filled randomly, according to the choices the user makes. The matrix must have 10 columns and 40 rows. Does anyone know a component, or how to fill it dynamically and randomly? Thanks.
Hi there! Decided to post a reply, as I found a working solution. You can define custom grid items width and use it with LazyVGrid: struct MyView: View { let bulletListGridItems = [ GridItem(.fixed(10)), GridItem() ] var body: some View { LazyVGrid(columns: bulletListGridItems, alignment: .leading, content: { GridRow { VStack(alignment: .leading, content: { Text(•) Spacer() }) Text(Play the course as you find it and play the ball as it lies.) } } } This would return: Note, I'm using a Stack with Spacer() to push the bullet to the top of the grid row
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Hi all, I am new to Swift and I have found an issue which I can't fix. I use a TabView and if I change the views a few times, and go back to this view I get this error and I can't tab on any of the views any longer in the Navigation Stack. The way to fix it, is to force close the app and reopen it. Error message: A NavigationLink is presenting a value of type “NavigationItem” but there is no matching navigationDestination declaration visible from the location of the link. The link cannot be activated. Note: Links search for destinations in any surrounding NavigationStack, then within the same column of a NavigationSplitView. Code: struct ToolsMainView: View { @State private var navigationPath = NavigationPath() var body: some View { NavigationStack(path: $navigationPath) { VStack { ScrollView(showsIndicators: false) { VStack { ForEach(navigationItems) { item in NavigationLink(value: item) { HStack(alignment: .center, spacing: 12) { Image(systemName: item.icon) Text(item.title) Spacer() Image(systemNa
Hi, I'm trying to change the behaviour of Command-click on Code under Xcode > Settings > Navigation to display the Action menu to use features such as Add Column Breakpoint. But unfortunately the option Selects Code Structure is not visible when unfolding for different options, the only choices are Jumps To Definition and Multi Cursor. I have seen other users having Selects Code Structure instead of Multi Cursor, I really wonder how Multi Cursor got there 😅 . Is there a way to make Selects Code Structure visible and selectable? Any help would be appreciated. I'm running Xcode 15 on macOS Sonoma.
(I posted this in the Distribution >> App Submission and Review forum 2 days ago but it has not received a response. Trying here...)I had to rebuild my iMac a few months ago and I restored from my Time Machine backup.I now need to make a change to an app but what used to compile without error is now failing at the codesign step with:Signing Identity: -As far as I can see, all of the account profiles are valid with expiry dates in the future. The only 'odd' thing is that some have a 'Download' button in the 'Action' column of the 'Provisioning Profiles' seciotn of the account details - when I select the Download All Profiles button, they turn grey but never seem to download or disappear (even after aiting for several hours!). Looking at the 'developer' web page, all of my certificates and provisioning profiles are all active.Any ideas welcomedThanksSusan
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
Signing Certificates
Provisioning Profiles
Hi. I'm glad you asked this because I'm constantly tripping over SwiftUI syntax myself. There are a bunch of ways to express the contents of your NavigationSplitView. Note that SwiftUI is not Swift. It looks like Swift, it is written in Swift, but it is a domain specific language for creating descriptions of user interfaces. It extends the Swift language. If you look at the documentation for NavigationSplitView in Xcode's Documentation viewer, you'll find struct NavigationSplitView where Sidebar : View, Content : View, Detail: View and if you click on View, you'll find that it is a protocol. The initializer you are using is the one which creates a two-column view, with no control over the visibility of the columns public init(@ViewBuilder sidebar: () -> Sidebar, @ViewBuilder detail: () -> Detail) where Content == EmptyView The parameters (labelled sidebar and detail here) are closures - functions returning structs conforming to the View protocol. my SidebarView and DetailView are Views
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
I've finally initialized the DataFrame like this var trainingData: DataFrame = [keywords : data.trainingKeywords, target: data.trainingTargets] but now i'm getting this error when creating my data model like this: let model = try MLLinearRegressor(trainingData: trainingData, targetColumn: target) CreateML Type Error: Column keywords has element of unsupported type Any. Any idea from there on?
Topic:
Machine Learning & AI
SubTopic:
Core ML
Tags:
Hi, How can I customize the Back Button in Column 2 Content in SplitView, like changing its color, label, icon ? Also is it possible to keep it visible even when Column 1 is shown and make it work like toggling showing and hiding Column 1 ? Kindest Regards
You can remove the toggle to show and hide the column with .toolbar(removing: .sidebarToggle) - https://developer.apple.com/documentation/swiftui/view/toolbar(removing:) For the back button, if you're navigating to a detail view, you can use .navigationBarBackButtonHidden() - https://developer.apple.com/documentation/swiftui/view/navigationbarbackbuttonhidden(_:) - on the detail view to hide the back button
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: