Search results for

column

2,071 results found

Post

Replies

Boosts

Views

Activity

Reply to NSXPC
Using a Dispatch semaphore to turn an asynchronous call into a synchronous call is generally considered bad form. That’s because the semaphore can’t propagate priority. That’s why we have -synchronousRemoteObjectProxyWithErrorHandler:. In the code serverProxy for synchronousRemoteObjectProxyWithErrorHandler access object The use of dispatch_async is to implement an asynchronous operation, and implement the corresponding timeout operation, to be precise, I should be required here to drop a serial column, the reason is because I found the line of sight NSXPC interface call timeout mode is like this. On the server side does not trigger the callback, the awareness is that the client side calls callbackWithInfo:info reply:^(bool action) and waits for the server side to call the action to implement the callback, but if the server side does not call the action all the time, That leads to more and more fds. I'm sure that if the NSXPC server side does not call the action callback function, the number of ports
Oct ’23
SwiftUI: Using View.scrollPostion(id:anchor) makes the ScrollView completely unscrollable
I'm trying to use the new (announced at WWDC 2023 and available in iOS 17 and macOS 14) API to observe scroll position of SwiftUI ScrollView. I have the following view, but I can't make it work correctly. That is, using the scrollPosition(id:anchor) view modifier makes the scroll view go nuts. At some point, and in some cases even at the very beginning, the scroll view just starts jumping and is stuttering when trying to scroll. See the screen recording here: https://mastodon.social/@tomkraina/111249340792812592 The code: struct ContentView: View { private var itemSize: CGSize = .init(width: 50.0, height: 50.0) // Annotated as @State to create the sections only once @State private var sectionData = makeSections() // Tracking scroll position @State private var currentItemID: MyIdentifier? var currentItemDescription: String { self.currentItemID?.stringId ?? nil } var body: some View { VStack { // 1. Scroll View ScrollView(.vertical) { LazyVGrid( columns: [.init(.adaptive(minimum: self.itemSize.width),
0
0
936
Oct ’23
Problem: Array of String Data -> Array of Double (and Int) Data
This may be trivial to some but I just would like to know if you can copy an array to a new array and change the type of the data for each column of elements? I have loaded a file into an array as String data as I can't seem to do it any other way (i.e. as another type) I now want to convert some of the columns to a different type in possibly a new array. I have an array full of string data and I would like to convert it to Double, or some Int, data so that I can easily do my calculations. I would appreciate as much info as possible as I am relatively new to SwiftUI and Xcode. Many thanks, D Norris
1
0
469
Oct ’23
Random "duplicate column name" crashes using SwiftData
Hello everyone, I am experiencing a very weird issue. I have a simple relationship between 2 models, that occasionally starts crashing the app, with the following error: error: : Attempting recovery from error encountered during addPersistentStore: 0x282523c60 Error Domain=NSCocoaErrorDomain Code=134110 An error occurred during persistent store migration. UserInfo={sourceURL=file:///private/var/mobile/Containers/Shared/AppGroup/F8286D67-AC8C-4441-A151-13B5AAA509F3/Library/Application%20Support/default.store, reason=Cannot migrate store in-place: I/O error for database at /private/var/mobile/Containers/Shared/AppGroup/F8286D67-AC8C-4441-A151-13B5AAA509F3/Library/Application Support/default.store. SQLite error code:1, 'duplicate column name: Z1POSITIONS', destinationURL=file:///private/var/mobile/Containers/Shared/AppGroup/F8286D67-AC8C-4441-A151-13B5AAA509F3/Library/Application%20Support/default.store, NSUnderlyingError=0x2825c6700 {Error Domain=NSCocoaErrorDomain Code=134110 An error occurred during
1
0
1.1k
Oct ’23
ShareLink not reliable, entitlement errors
I am using public struct ShareLink : View where Data : RandomAccessCollection, PreviewImage : Transferable, PreviewIcon : Transferable, Label : View, Data.Element : Transferable {} And it is generating entitlement errors and not working reliably ( will transfer 1-3 items, but not 4+ ; will not work a second time) Error is: Error acquiring assertion: Received port for identifier response: <> with error:Error Domain=RBSServiceErrorDomain Code=1 Client not entitled UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <> with error:Error Domain=RBSServiceErrorDomain Code=1 Client not entitled UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <> with er
6
0
7.6k
Oct ’23
Confusing TestFlight stats
I'm confused by the stats on the TestFlight builds screen. See below. There are more crashes than sessions. So the definition of session can't quite be what I thought. Does a session have to last more than a certain amount of time to be included? Do sessions that end in a crash not count as sessions? Do multiple invocations within a short period of time count as a single session? The number of sessions falls over time. I.e. once I have released a new version, the reported Sessions numbers for older versions slowly fall. Maybe as soon as a user has used version N+1, all their sessions for version N are removed from the stats? The invites column is clearly the same for every version, while it should have been slowly increasing. Is there any value in these numbers?
1
0
704
Oct ’23
Animating Removal From LazyVGrid inside ScrollView Issue
I have a two column LazyVGrid inside a ScrollView and want to animate the removal of an item when the user taps on it. This seems to work fine when either the top or the bottom of the grid is visible (i.e. scrolled all the way up or down) and when removing an item doesn't change the number of rows. But when you scroll down a bit and remove an item when it results in the number of rows changing, it flashes as it's rendering. Minimally Reproducible Example import SwiftUI extension Color { static var random: Color { let red = Double.random(in: 0...1) let green = Double.random(in: 0...1) let blue = Double.random(in: 0...1) return Color(red: red, green: green, blue: blue) } } struct ContentView: View { @State private var items: [Int] = Array(1...50) let columns = [GridItem(.flexible(), spacing: 2), GridItem(.flexible(), spacing: 2)] var colorDictionary: [Int: Color] = [:] init() { for i in 1...50 { colorDictionary[i] = Color.random } } var body: some View { ScrollView { LazyVGrid(columns
0
0
879
Oct ’23
Did anything change in LazyVGrid in Xcode 15 ?
If I run the exact same code on MacOS 12.7 (Xcode 14.2) and MacOS 15.0.1 (Xcode 15.0.1). In a scrollView, I display lines (lineDivider) and then a LazyVgrid, applying some offset: ScrollView(.vertical) { ForEach(1...50, id: .self) { index in LabelledDivider(label: (index), color: .gray.opacity(0.1)) .offset(y: CGFloat(65*index - 50) } LazyVGrid(columns: gridItemLayout, spacing: 33 ) { ForEach ($allItems.theItems) { $item in ItemView(item: item) } } .offset(y: 40) } In Xcode 14.2, I get the first layout and in Xcode 15.0 the second on right: The divider line is at the same position, but the view in grid is not. If I change .offset(y: 40) to .offset(y: 60) I get the same layout. So my questions: did anyone observe similar change ? is it due to Xcode, to MacOS ? Is it documented somewhere ?
0
0
675
Oct ’23
Swift Data value is duplicated between two variables in a class
I'm using two loops, one nested in another to create and assign a subclass to the parent class. I'm using x for one loop and y for the other loop. Print statement shows the loop variables being updated correctly, however the subclass has both variables as the same value. I'm not sure if the value is being stored as the same value or being displayed as the same value. I've checked both creation and display code. I can't find the error. var body: some View { NavigationSplitView { List { ForEach(routes) { item in NavigationLink { Text(Route: (item.route_name) nSeason: (item.route_season)nCoordinates: (item.route_coordinates)nProcessed: (String(item.route_processed))nNumber of baseboards: (item.route_baseboards.count)) } label: { Text(item.route_name) } //end route nav link } //end route for each .onDelete(perform: deleteItems) //end route nav ForEach(baseboards) { item in NavigationLink { //if let test = item.baseboard_heightPoints.count { Text(Grid Size: (String(item.baseboard_grid_size))nRow:(String(item.baseb
3
0
1.1k
Oct ’23
Color conversion matrix YCbCr422 and YCbCr420 10 bit to RGB
I need to know correct color conversion matrices for converting YCbCr422 and YCbCr420 10 bit video range sample buffers (BT.2020 color space) to RGB. AVFoundation framework mentions AVVideoYCbCrMatrix_ITU_R_2020 which is a string constant. But I need to know the full matrix that can be used to perform color conversion. I have this matrix for full range BT2020, not sure if this is correct and what is the correct way to adapt it to video range. let colorMatrixBT2020_fullRange = ColorConversion(matrix: matrix_float3x3(columns: (simd_float3(1.0, 1.0, 1.0), simd_float3(0.000, -0.11156702/0.6780, 1.8814), simd_float3(1.4746, -0.38737742/0.6780, 0.000))), offset: vector_float3(0.0, -0.5, -0.5))
0
0
527
Oct ’23
Reply to SwiftUI Table with TextField becomes unresponsive as entries increase
Hi, did you solve this? My guess is ( I didn't need it yet so far, but know I have to start about this next week ), but can't you make all the fields a Text and do a check if it is a row/column that should be ( by check double click or so ) edited replace the row with TextField's and change it back to Text. I think that you to have .modify one of the other to match each other visually. Beside that the var is used in all the rows and the same and is not usable to edit or change one people item. But if you found a solution then.... let us/me know.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’23
Reply to errSecInternalComponent building locally with Xcode
In the My Certificates tab, that certificate and its associated private key both show login in the Keychain column. I have several other development identities in my keychain and others are working, it's just this one that isn't. The others also have both their certificates and private keys in the login keychain.
Topic: Code Signing SubTopic: General Tags:
Oct ’23