Search results for

“column”

2,085 results found

Post

Replies

Boosts

Views

Activity

Reply to Crash Reports for Swift
Thanks Eskimo but this did not work for me even though I have the archive stored. Any tips to get this working so I can get my logs symbolicated?Xcode will automatically symbolicate all crash reports that it encounters, if it has the .dSYM and application binary that produced the crash report. Given a crash report, the matching binary, and its .dSYM file, all you need to do for symbolication is to add the crash report to the Xcode Organizer.Connect an iOS device to your MacChoose Devices from the Window menuUnder the DEVICES section in the left column, choose a deviceClick the View Device Logs button under the Device Information section on the right hand panelDrag your crash report onto the left column of the presented panelXcode will automatically symbolicate the crash report and display the results
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’16
Reply to Weird behavior with NavigationSplitView and @State
Same issue is happening when you have Three Column layout. But it seems to be more visible what is happening. When I select other category in the main sidebar, the selected item in secondary sidebar won't get unselected, plus new item from selected category gets selected. So now after two clicks I have somehow two selected items in my secondary sidebar and when i'll continue playing with it I'll get thread ERROR. The problem is the automatic selection of item in second list. you can't touch on that and reset it when the category from primary sidebar is changed. What is really surprising for me is that I haven't found any threads about this so far, even though this behavior is happening in the most basic example of three column layout where you have same items in different categories.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’23
Reply to How to Swizzle Framework methods?
Actually I'm trying to create a replacement class for NSTableHeaderCell that allows table column headers to have two lines of text. Previously it worked when poseAsClass feature was available. Now as it is deprecated, I need an alternative to maintain the functionality of poseAsClass, so I tried implementing method swizzling.Thanks
Topic: Programming Languages SubTopic: General Tags:
Apr ’18
Reply to Xcode 9.3 Code Coverage
Hi Nataliia,It looks like code coverage is off by default in 9.3. You need to enable it in the scheme editor. Unfortunately, the Enable code coverage section of the Xcode Help docs is a little out-of-date. Here is the process:1. Choose Edit Scheme from the scheme menu in the toolbar.2. In the left column, select the Test scheme action.3. Click Options at the top of the right column.4. Click the “Gather coverage for” check box and set the popup to either all targets or some targets.5. Click Close.After doing this for a new iOS framework project, code coverage worked as expected for me. The Editor > Show Code Coverage command shows the results in the right margin.
Apr ’18
Reply to SwiftUI NavigationSplitView on macOS: unwanted vertical space in detail column
Thanks @Starfia, this appears to be a bug. Thanks very much for confirming that – at least it quiets my indecision about how to proceed. That advice just gives me a Content View that conforms to the detail column's resizable area, though, so I don't think it gives me the fixed-sizedness I'm looking for. The closest I've been able to come has been to hard-code the frame of the Navigation Split View itself, but that involves knowing the combined height of all views I might add to the detail column at all times (alongside which the unwanted safe area propagation persists), so it's a whole undertaking. I think for this iteration, I just have to avoid using NavigationSplitView or the Inspector; I have to implement alternatives to those provided functionalities, but the layout issues disappear the moment I sidestep them.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’24
Reply to Illegal NSTableViewDataSource
That means your cell is nil, because it was not yet created. You did not see before because it was never called.So, do this:extension RegistrationReportsViewController: NSTableViewDelegate { func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { if tableColumn == nil { return nil } // Extra safety if let cell = tableView.makeView(withIdentifier: (tableColumn!.identifier), owner: self) as? NSTableCellView { let column = tableView.tableColumns.firstIndex(of: tableColumn!)! let registration = fetchedResultsController.fetchedObjects! [row] print (Start NSTableView Delegate) switch column { case 0: cell.textField?.stringValue = registration.lastName ?? case 1: cell.textField?.stringValue = registration.firstName ?? case 2: cell.textField?.stringValue = registration.middleName ?? default: break } return cell } return nil // Failed } }
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’20
Reply to Data storage for a Matrix struct when working with Accelerate
I would also like to mention that running the code below gives me almost identical elapsed times for the matrix array and matrix buffer solutions. So, at least for this case, I'm not seeing any performance differences between the two approaches. func runBenchmark1() { print(Benchmark matrix multiplication) for _ in 1...3 { let tic = Date.now let n = 8_000 let a = Matrix(rows: n, columns: n, fill: 1.5) let b = Matrix(rows: n, columns: n, fill: 2.8) let c = a * b let toc = tic.timeIntervalSinceNow.magnitude let elapsed = String(format: %.4f, toc) print(Elapsed time is (elapsed) sec, first element is (c[0, 0])) } }
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’24
Reply to Plist max size
Is the table rectangular? That is, does each row have the same number of columns? And vice versa?Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Feb ’17
Reply to Need help for generics and extension
What I mean is that, if you have other code in the same file as your struct definition, you could do something like this:var a2 = Array2D(nbRows: 1, nbCol: 1, repeatedValue: true) a2.nCol = 5 a2.nRows = 5Because the private keyword only restricts access from code in other source files. Now, the nCol and nRows properties and the colCount and rowCount functions do not indicate the actual size of the array, and the row and column functions will crash.If you have the struct definition in it's own source file with nothing else, it won't be a problem.As I mentioned, to make sure even code in the same source file can't mess things up, you could use read-only computed properties and get rid of the colCount and rowCount functions.struct Array2D<T: Equatable> { var matrix : [[T]] var nRows: Int { return self.matrix.count } var nCol : Int { if self.matrix.count > 0 { return self.matrix[0].count } else { return 0 } } Also, your row and column functions should check to make sure that the index v
Topic: Programming Languages SubTopic: Swift Tags:
May ’16
Reply to Apple Quick Start Program
Hi, TomerTzi! You can apply here: https://developer.apple.com/programs/universal/ . And remember to read Eligibility column. Also reading 'Universal App Quick Start Program terms and conditions' (on the same web page) is highly recommended. All the best, Alex
Jun ’20
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 Disabling edit on single-click in view-based NSTableView?
My solution to this problem has (for a long time) been to make the columns of the table not editable. But, in my case, I'm using the double click action as a means of getting to an editor to edit the whole row, as the row is only a very limited representation of some aspects of the underlying object.Rod
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Jun ’15
Reply to NO ANIMATIONS in NavigationStack or NavigationSplitView
If you are using NavigationSplitView without stacks, unfortunately, you'll need to use the same workaround above. Which effectively means shimming a NavigationStack as the root of the column in which you want the animations, and then structuring your NavigationLinks such that they aren't targeting the stack.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Crash Reports for Swift
Thanks Eskimo but this did not work for me even though I have the archive stored. Any tips to get this working so I can get my logs symbolicated?Xcode will automatically symbolicate all crash reports that it encounters, if it has the .dSYM and application binary that produced the crash report. Given a crash report, the matching binary, and its .dSYM file, all you need to do for symbolication is to add the crash report to the Xcode Organizer.Connect an iOS device to your MacChoose Devices from the Window menuUnder the DEVICES section in the left column, choose a deviceClick the View Device Logs button under the Device Information section on the right hand panelDrag your crash report onto the left column of the presented panelXcode will automatically symbolicate the crash report and display the results
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’16
Reply to Weird behavior with NavigationSplitView and @State
Same issue is happening when you have Three Column layout. But it seems to be more visible what is happening. When I select other category in the main sidebar, the selected item in secondary sidebar won't get unselected, plus new item from selected category gets selected. So now after two clicks I have somehow two selected items in my secondary sidebar and when i'll continue playing with it I'll get thread ERROR. The problem is the automatic selection of item in second list. you can't touch on that and reset it when the category from primary sidebar is changed. What is really surprising for me is that I haven't found any threads about this so far, even though this behavior is happening in the most basic example of three column layout where you have same items in different categories.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to How to Swizzle Framework methods?
Actually I'm trying to create a replacement class for NSTableHeaderCell that allows table column headers to have two lines of text. Previously it worked when poseAsClass feature was available. Now as it is deprecated, I need an alternative to maintain the functionality of poseAsClass, so I tried implementing method swizzling.Thanks
Topic: Programming Languages SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’18
Reply to Xcode 9.3 Code Coverage
Hi Nataliia,It looks like code coverage is off by default in 9.3. You need to enable it in the scheme editor. Unfortunately, the Enable code coverage section of the Xcode Help docs is a little out-of-date. Here is the process:1. Choose Edit Scheme from the scheme menu in the toolbar.2. In the left column, select the Test scheme action.3. Click Options at the top of the right column.4. Click the “Gather coverage for” check box and set the popup to either all targets or some targets.5. Click Close.After doing this for a new iOS framework project, code coverage worked as expected for me. The Editor > Show Code Coverage command shows the results in the right margin.
Replies
Boosts
Views
Activity
Apr ’18
Reply to SwiftUI NavigationSplitView on macOS: unwanted vertical space in detail column
Thanks @Starfia, this appears to be a bug. Thanks very much for confirming that – at least it quiets my indecision about how to proceed. That advice just gives me a Content View that conforms to the detail column's resizable area, though, so I don't think it gives me the fixed-sizedness I'm looking for. The closest I've been able to come has been to hard-code the frame of the Navigation Split View itself, but that involves knowing the combined height of all views I might add to the detail column at all times (alongside which the unwanted safe area propagation persists), so it's a whole undertaking. I think for this iteration, I just have to avoid using NavigationSplitView or the Inspector; I have to implement alternatives to those provided functionalities, but the layout issues disappear the moment I sidestep them.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Illegal NSTableViewDataSource
That means your cell is nil, because it was not yet created. You did not see before because it was never called.So, do this:extension RegistrationReportsViewController: NSTableViewDelegate { func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { if tableColumn == nil { return nil } // Extra safety if let cell = tableView.makeView(withIdentifier: (tableColumn!.identifier), owner: self) as? NSTableCellView { let column = tableView.tableColumns.firstIndex(of: tableColumn!)! let registration = fetchedResultsController.fetchedObjects! [row] print (Start NSTableView Delegate) switch column { case 0: cell.textField?.stringValue = registration.lastName ?? case 1: cell.textField?.stringValue = registration.firstName ?? case 2: cell.textField?.stringValue = registration.middleName ?? default: break } return cell } return nil // Failed } }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’20
Reply to Data storage for a Matrix struct when working with Accelerate
I would also like to mention that running the code below gives me almost identical elapsed times for the matrix array and matrix buffer solutions. So, at least for this case, I'm not seeing any performance differences between the two approaches. func runBenchmark1() { print(Benchmark matrix multiplication) for _ in 1...3 { let tic = Date.now let n = 8_000 let a = Matrix(rows: n, columns: n, fill: 1.5) let b = Matrix(rows: n, columns: n, fill: 2.8) let c = a * b let toc = tic.timeIntervalSinceNow.magnitude let elapsed = String(format: %.4f, toc) print(Elapsed time is (elapsed) sec, first element is (c[0, 0])) } }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to App targeting iOS 8 with an intent extension crashes in the simulator
You need to set Intents as an Optional linkage so that older iOS versions skip over it. In the build phases for your project, under the Link Binary with Libraries phase, look for the Intents framework, and set it to Optional under the Status column.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’18
Reply to Plist max size
Is the table rectangular? That is, does each row have the same number of columns? And vice versa?Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’17
Reply to WeatherKit undocumented dataset name: trendComparison
See a similar finding in this thread: WeatherKit REST API new columns for CurrentWeather. Basically, if it’s not documented, it doesn’t exist. Just make sure your parsing logic safely ignores any objects or fields it doesn’t recognize.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’23
Reply to Need help for generics and extension
What I mean is that, if you have other code in the same file as your struct definition, you could do something like this:var a2 = Array2D(nbRows: 1, nbCol: 1, repeatedValue: true) a2.nCol = 5 a2.nRows = 5Because the private keyword only restricts access from code in other source files. Now, the nCol and nRows properties and the colCount and rowCount functions do not indicate the actual size of the array, and the row and column functions will crash.If you have the struct definition in it's own source file with nothing else, it won't be a problem.As I mentioned, to make sure even code in the same source file can't mess things up, you could use read-only computed properties and get rid of the colCount and rowCount functions.struct Array2D<T: Equatable> { var matrix : [[T]] var nRows: Int { return self.matrix.count } var nCol : Int { if self.matrix.count > 0 { return self.matrix[0].count } else { return 0 } } Also, your row and column functions should check to make sure that the index v
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’16
Reply to Apple Quick Start Program
Hi, TomerTzi! You can apply here: https://developer.apple.com/programs/universal/ . And remember to read Eligibility column. Also reading 'Universal App Quick Start Program terms and conditions' (on the same web page) is highly recommended. All the best, Alex
Replies
Boosts
Views
Activity
Jun ’20