Search results for

column

2,047 results found

Post

Replies

Boosts

Views

Activity

Preview Autogenerated Code Error
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
4
0
1.5k
Feb ’24
iPhone won't sync after iOS 17.2.1 upgrade
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?
1
0
751
Jan ’24
Reply to Dynamic e random matrix
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:
Jan ’24
Reply to SwiftUI indentation in multiline string
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:
Jan ’24
The link cannot be activated.
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
1
0
1.1k
Jun ’24
"Selects Code Structure" not visible in Xcode Settings > Navigation
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.
4
0
902
Oct ’23
Signing identity error "-"
(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
10
0
9.9k
Aug ’23
Reply to Understanding the swift language and its documentation
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:
Dec ’23
Reply to DataFrame's Column doesn't support array of dictionary
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:
Dec ’23
Reply to Customizing Back Button in Column 2 "Content" in SplitView
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:
Dec ’23
NavigationSplitView resetting when app enters background
I've been trying to build an app using NavigationSplitView and SwiftUI on iOS 16. I noticed that as soon almost as the app enters the background (sometimes I have to wait a few seconds before immediately reopening the app) the contents of the NavigationSplitView are reset. This behavior differs from a NavigationStack using essentially the same path and app structure. I'm wondering if anyone has any idea why this happens? I did a little investigation and can say I've noticed a few things If using a List with a selection item specified, the selection item is set to nil when the app enters the background. For NavigationSplitView this typically will reset the downstream Detail or Content view since the value is lost If using a List without the selection parameter specified this effect is mitigated but the view still is reset and things like scroll position are wiped despite no content changing. Self._printChanges() indicates the view is unchanged despite being reset to its initial state. Using Apple's own WWDC sa
2
0
1.4k
Dec ’23
Reply to Issues with String Catalogs comments and git
It seems to me that you shouldn't really be using the same key for both of these localized strings, since they are used in different places. Even if the localized strings come out the same in general, it's a risky assumption that the different UI contexts (column titles and button titles in your example) won't require different strings for some languages. For example, in some languages the string might need to be capitalized differently in these 2 places. If you really do want to use the exact same localized string in both places, I'd recommend that you use the same comment everywhere in your source code, describing both intended uses. If you fully specify the comment this way, you avoid confusion for the translator too. Otherwise, you should use a unique string at each call site, such as Something-List-Title and Something-Button-Title, and use the comments to clarify exactly what needs to be localized. I also recommend that you use Feedback Assistant to submit a enhancement request for (say) a way o
Dec ’23