Search results for

column

2,061 results found

Post

Replies

Boosts

Views

Activity

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
927
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
Issues with String Catalogs comments and git
Hello, I migrated a project to use String Catalogs (Localizable.xcstrings) instead of Localized.strings and Localized.stringsdict files. So far so good, but since I use a lot localized strings in my project, there are quite some localizations used more than once in different contexts and thus with different comments. For example: Source file 1: String(localized: Something, comment: Button title for context1) Source file 2: String(localized: Something, comment: Column title for context2) This results to a Localized.xcstrings file with this content: { sourceLanguage : en, strings : { Something : { comment : Column title for context2nButton title for context1 } }, version : 1.0 } The main problem with this is, that the order of the concatenated comment changes randomly during each build. After the next Xcode build (without any code changes), the same Localized.xcstrings file might look like this: { sourceLanguage : en, strings : { Something : { comment : Button title for context1nColumn title f
1
0
1.6k
Dec ’23
Couldn't parse json?
I'm creating a view by reading several json files at once. I'm reading 6 files from indexes 0 to 5 and displaying each view. Until the day before yesterday, only the view of index 0 was executed and the rest of the errors appeared, but I didn't correct anything, but the file in index 1 starts to read, and from 2 the same error appears. In my json file, there is no '/' in row 1 of column 1, but there is a '/' in row 1 of column 1, so I think they say that they can't read it as a json file [ { name: recipe1, id: 1001, description: 1, imageName: Recipe01 }, { name: recipe2, id: 1002, description: 2, imageName: Recipe01 }, { name: recipe3, id: 1003, description: 3, imageName: Recipe01 }, { name: recipe4, id: 1004, description: 4, imageName: Recipe01 }, { name: recipe5, id: 1005, description: 5, imageName: Recipe01 }, { name: recipe6, id: 1006, description: 6, imageName: Recip01 }, { name: recipe7, id: 1007, description: 7, imageName: Recip01 } ]
1
0
415
Dec ’23
Reply to Upgraded to Xcode 15.0.1 and no longer see NSLog messages
I have found a solution , see this post [https://developer.apple.com/forums/thread/742594] Select the relevant product in the the Scheme dropdown (e.g. [AppName] Watchkit App, or [AppName] for iOS app Select Edit Scheme... Select Run in list on the left Select Arguments tab Click > next to Environment Variables to show a (probably empty) list. Click + In Name column, double click the space and enter: IDELogRedirectionPolicy In Value column double click the space and enter: oslogToStdio Ensure the checkbox is selected Click Close button. You have to repeat these steps for each iOS, WatchOS product as each has its own Run Scheme. Now NSLogs will print to the Debug Console again.
Dec ’23