Search results for

“column”

2,091 results found

Post

Replies

Boosts

Views

Activity

Reply to SwiftUI dynamic number of columns with LazyVGrid
Yes, it helped another ancient coder. I'm working on Swift access to MySQL databases to maintain homemade bookkeeping programs. I wanted to display the results of a query, which can of course have a varying number of columns with varying keys. I tried for a couple of days to figure out the Table/TableColumn SwiftUI View, and then found your post. Something like this is working great: ForEach(aDBModel.dbRowsAsDicts, id: .id) { thisDict in HStack { LazyVGrid(columns: obsColumns, content: { ForEach(aDBModel.identifiableFieldNames, id:.id) { aColName in Text(thisDict.theDict[aColName.theString] ?? ) } }) } } Thanks! XCode sure beats keypunching, waiting for your deck of cards to run, and then looking up a bunch of numeric error codes!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’22
Reply to Help with a script to automate data entry
Someone on another forum tried to help by writing a macro for Excel but I failed to tell him I was using Numbers so, of course, it doesn't work but they did give me a clue in their attempt. I need to write a script that: (I can change the names later) -calls up the document XXX -calls up Sheet1 -copies the value of Sheet1, cell B67 -calls up sheet Sheet2 -pastes the result in cell A3 of Sheet2 -inserts a new column (or row) A on Sheet2 (preserving previous result) -recalculates Sheet1 -copies the result from Sheet1, cell B67 to column A of Sheet2 in cell A3 and do that 2000 times Can any good apple script writers out there help me achieve this? Thanks in advance
Mar ’24
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
Reply to Print something on the screen
I created the structure down the let columns above the ContentView and I called the NumberView in the Button's action and now the error it's gone. But when I play my code and click the button it doesn't show me the text. Can't understand why...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to Save DataFrames as CSVs
I don’t think there’s a way to do that but, if you know that the names are unique, you can rename the columns after the join. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’22
Reply to Problems with connections (IBActions)
In my code, the class 'ExampleA' is a UIViewController, and class 'ExampleB', is a UITableViewController, because I am trying to link 2 different ViewControllers. My objective is that when the user clicks on a button, it will set off a table in a different ViewController to add a column to it.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’19
Reply to App crashed
In your snippet, blocks is an array of arrays, which you’re treating like a two-dimensional array. Both row and col values range from 0 to 16. However, your blocks array has a row count of 1 and a column count of 2. Hence the out of bounds trap. In short, you need many more values in blocks. Or you need to reduce the range of row and col. For the former, you can use repeatedElement(_:count:): let blocks = [[Color]](repeatElement([Color](repeatElement(Color.purple, count: columns)), count: rows)) Oh, one last thing: Swift supports half open ranges, so you can write this: 0...self.rows - 1 as this: 0..
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’22
Reply to UILabels of three UIPickerViews revert to previous value (sometimes) and change without selection.
myPickerDidSelectRowInCase could be anything that changes the results only for items in the column. Simplest would be to select actual values for each column based on caseOfPicker. In the code below, which is more complex, i'm setting a column specific delegate that is used to fetch data before ereloading the collection view.protocol EgPickerDelegate { func myPickerDidSelectRowInCase(selectedRowValue: Int?, caseOfPicker: Int?) } extension EgEndingsCVTVCell: UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout, EgPickerDelegate { func myPickerDidSelectRowInCase(selectedRowValue: Int?, caseOfPicker: Int?) { switch caseOfPicker { case 0: col0GenderPredicate = genderPredicator(selectedRowValue: selectedRowValue ?? 0) case 2: col2GenderPredicate = genderPredicator(selectedRowValue: selectedRowValue ?? 0) case 3: col3GenderPredicate = genderPredicator(selectedRowValue: selectedRowValue ?? 0) default: col0GenderPredicate = genderPredicator(selectedRowVal
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’19
Reply to SwiftUI NavigationSplitView on macOS: unwanted vertical space in detail column
A fascinating update. I've tried adding the newly-introduced Inspector modifier, which I also intended to use in the app I'm making: import SwiftUI @main struct TestApp: App { @State var isShowingInspector: Bool = true var body: some Scene { WindowGroup { NavigationSplitView( sidebar: { }, detail: { ContentView() } ) .inspector(isPresented: self.$isShowingInspector) { } } .windowResizability(.contentSize) .windowToolbarStyle(.unified(showsTitle: false)) } } struct ContentView: View { let complaint = What's with the vertical space around me when I'm in a detail column? var body: some View { VStack(spacing: 0) { Text(complaint) .font(.title) .ignoresSafeArea() .frame(width: 300, height: 300) .background(.blue) } } } This time, SwiftUI apparently adds entire toolbar's height to the minimum height of the window again! Now the detail column's mysterious vertical space equals twice the height of the toolbar: It doesn't seem to matter whether the Inspector is applied to the Navigation Split Vie
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’24
Reply to Side by side Picker wheels failing in iOS 15
Here's a simulator screenshot (iPhone SE). I've marked about where the border is, for the touch events. In my real app, with wider text, it's even further to the right, so that touching the first column of text actually spins the second picker.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to SwiftUI dynamic number of columns with LazyVGrid
Yes, it helped another ancient coder. I'm working on Swift access to MySQL databases to maintain homemade bookkeeping programs. I wanted to display the results of a query, which can of course have a varying number of columns with varying keys. I tried for a couple of days to figure out the Table/TableColumn SwiftUI View, and then found your post. Something like this is working great: ForEach(aDBModel.dbRowsAsDicts, id: .id) { thisDict in HStack { LazyVGrid(columns: obsColumns, content: { ForEach(aDBModel.identifiableFieldNames, id:.id) { aColName in Text(thisDict.theDict[aColName.theString] ?? ) } }) } } Thanks! XCode sure beats keypunching, waiting for your deck of cards to run, and then looking up a bunch of numeric error codes!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Help with a script to automate data entry
Someone on another forum tried to help by writing a macro for Excel but I failed to tell him I was using Numbers so, of course, it doesn't work but they did give me a clue in their attempt. I need to write a script that: (I can change the names later) -calls up the document XXX -calls up Sheet1 -copies the value of Sheet1, cell B67 -calls up sheet Sheet2 -pastes the result in cell A3 of Sheet2 -inserts a new column (or row) A on Sheet2 (preserving previous result) -recalculates Sheet1 -copies the result from Sheet1, cell B67 to column A of Sheet2 in cell A3 and do that 2000 times Can any good apple script writers out there help me achieve this? Thanks in advance
Replies
Boosts
Views
Activity
Mar ’24
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.
Replies
Boosts
Views
Activity
Dec ’23
Reply to Print something on the screen
I created the structure down the let columns above the ContentView and I called the NumberView in the Button's action and now the error it's gone. But when I play my code and click the button it doesn't show me the text. Can't understand why...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Can I add a videofeed from an external source in RoomPlan ARKit?
It may be possible, only if you know the shape, size, position, and orientation of your target object surface, e.g. floor, wall, ceiling, column, etc. https://github.com/CurvSurf/FindSurface-SceneKit-ARDemo-iOS
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to Save DataFrames as CSVs
I don’t think there’s a way to do that but, if you know that the names are unique, you can rename the columns after the join. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to Problems with connections (IBActions)
In my code, the class 'ExampleA' is a UIViewController, and class 'ExampleB', is a UITableViewController, because I am trying to link 2 different ViewControllers. My objective is that when the user clicks on a button, it will set off a table in a different ViewController to add a column to it.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’19
Reply to Apple or anyone @TableColumnBuilder usage?
Creating a table view under macOS where the number of columns are less than 10 but The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to App crashed
In your snippet, blocks is an array of arrays, which you’re treating like a two-dimensional array. Both row and col values range from 0 to 16. However, your blocks array has a row count of 1 and a column count of 2. Hence the out of bounds trap. In short, you need many more values in blocks. Or you need to reduce the range of row and col. For the former, you can use repeatedElement(_:count:): let blocks = [[Color]](repeatElement([Color](repeatElement(Color.purple, count: columns)), count: rows)) Oh, one last thing: Swift supports half open ranges, so you can write this: 0...self.rows - 1 as this: 0..
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Unable to upload In-App-Purchase from Xcode to App Store Connect
In Xcode, make sure that the IAPProductIdentifier field in the ContentInfo.plist file is set to your product identifier (the product ID column in App Store Connect). When uploading the archived hosted package, select the app's bundle identifier associated with this product identifier to proceed.
Replies
Boosts
Views
Activity
Jun ’20
Reply to UILabels of three UIPickerViews revert to previous value (sometimes) and change without selection.
myPickerDidSelectRowInCase could be anything that changes the results only for items in the column. Simplest would be to select actual values for each column based on caseOfPicker. In the code below, which is more complex, i'm setting a column specific delegate that is used to fetch data before ereloading the collection view.protocol EgPickerDelegate { func myPickerDidSelectRowInCase(selectedRowValue: Int?, caseOfPicker: Int?) } extension EgEndingsCVTVCell: UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout, EgPickerDelegate { func myPickerDidSelectRowInCase(selectedRowValue: Int?, caseOfPicker: Int?) { switch caseOfPicker { case 0: col0GenderPredicate = genderPredicator(selectedRowValue: selectedRowValue ?? 0) case 2: col2GenderPredicate = genderPredicator(selectedRowValue: selectedRowValue ?? 0) case 3: col3GenderPredicate = genderPredicator(selectedRowValue: selectedRowValue ?? 0) default: col0GenderPredicate = genderPredicator(selectedRowVal
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’19
Reply to SwiftUI NavigationSplitView on macOS: unwanted vertical space in detail column
A fascinating update. I've tried adding the newly-introduced Inspector modifier, which I also intended to use in the app I'm making: import SwiftUI @main struct TestApp: App { @State var isShowingInspector: Bool = true var body: some Scene { WindowGroup { NavigationSplitView( sidebar: { }, detail: { ContentView() } ) .inspector(isPresented: self.$isShowingInspector) { } } .windowResizability(.contentSize) .windowToolbarStyle(.unified(showsTitle: false)) } } struct ContentView: View { let complaint = What's with the vertical space around me when I'm in a detail column? var body: some View { VStack(spacing: 0) { Text(complaint) .font(.title) .ignoresSafeArea() .frame(width: 300, height: 300) .background(.blue) } } } This time, SwiftUI apparently adds entire toolbar's height to the minimum height of the window again! Now the detail column's mysterious vertical space equals twice the height of the toolbar: It doesn't seem to matter whether the Inspector is applied to the Navigation Split Vie
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Make method less repetative
I may be reading your code wrong but, it seems kind of redundant to repeat thereturn { row, column inlet newCol = -2 * columnAlso, it seems to me you only need the default:return (newCol, 0) once for instance in the final else clause.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’15
Reply to Runtime crash on iOS16 when iOS17 framework is mentioned
Found the fix! Choose your Target, select Build Phases. Expand Link Binary With Libraries, press the + button Add your Framework (in this case, VisionKit)... and then choose 'Optional' in the status column. Not quite sure why this fixes it, but it does.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’23