Search results for

column

2,071 results found

Post

Replies

Boosts

Views

Activity

Reply to How can I achieve this effect using SwiftUI or ShaderGraph?
Hi @NahtanMak I was able to achieve a similar effect using shader graph. I adjust each pixel's opacity based on its distance from the center of the image. I used texture coordinates to calculate that distance. Here's how to setup the graph: Add an Image node. Connect its Out to the color property on an UnlitSurface. Add a TextureCoordinates node. Connect its Out to the In of a Remap node. For both columns of the Remap node, change:Out Low to -1 and Out High to 1. Drag its Out to the In of Magnitude node. Drag the Out of the Magnitude node to a new Remap node. Set Out Low to 1 and Out High to 0. Drag the Out to Opacity on the UnlitSurface you created in the first step. Note: you can change the In Low property on the Remap node you created in the previous step to control when the gradient begins. If you set it to 0 the gradient will start in the center of the image. If you set it to 0.5 the gradient will start 50% from the center of the image. If you set it to 1, there will be no gradient. Please accep
Topic: Spatial Computing SubTopic: General Tags:
Feb ’25
Reply to NSLayoutManager laying out overlapping text into the same NSTextContainer even when there are more containers available.
Thank you. I decided to keep trying at it - as my code base was a little too much to simplify in order to share it. I couldn't solve it no matter what I did at a granular level. BUT, when I simply removed my measuringLayoutManager and had all code use a single layoutManager, the problems went away. Something in the text system really did not like it when I had more than one layout manager laying out the same text storage, even though I ensured that that second layout manager used a separate set of text containers, and even though those text containers were not tied to any views, nor ever passed as objects/references. Merely having a second layout manager assigned to the text storage, doing layout passes into its own containers in order to calculate sizes seemed to be the source of the problem. I simplified and am using a single layout manager now. My calculated sizes are the same as they were when calculated by my second measuringLayoutManager. So there was nothing wrong with the calculations there. But I no
Topic: UI Frameworks SubTopic: AppKit Tags:
Feb ’25
Network Extension Unexpectedly Terminated by iOS
We are experiencing an issue where our iOS app’s network extension (acting as a VPN) is being unexpectedly terminated by the operating system. The termination appears identical to a user-initiated stop, as the extension receives the following call: NEProviderStopReasonUserInitiated. The issue occurs sporadically but can happen 10–20 times per day on devices with less than 10% free storage. On one affected device, opening the Camera app (or using the camera within another app like WhatsApp) consistently triggers the issue, making it easily reproducible. Memory consumption does not seem to be the cause—the extension is stopped while using only ~10MB of memory, well below the 50MB limit. We noticed a pattern related to swap usage: • On affected devices, the “Swap Used” column shows very low values (a few MB). • On unaffected devices, swap usage is significantly higher (hundreds of MB). • This is the only clear difference we’ve observed. The issue occurs across different device models and iOS versions (1
2
0
301
Feb ’25
Getting Error: Type '()' cannot conform to 'View'
can't see what the problem is .. Im getting the error: Type '()' cannot conform to 'View' struct CalendarView: View { @StateObject private var viewModel = CalendarViewModel() @State private var selectedDate: CalendarDate? @State private var showModal = false var body: some View { VStack { Text(Calendar App) .font(.largeTitle) .padding() GridStack(rows: 5, columns: 7) { row, col in let index = row * 7 + col if index < viewModel.calendarDates.count { let calendarDate = viewModel.calendarDates[index] Text((Calendar.current.component(.day, from: calendarDate.date))) .frame(width: 40, height: 40) .background(calendarDate.isSelected ? Color.blue : Color.clear) .cornerRadius(10) .foregroundColor(calendarDate.isSelected ? Color.white : Color.black) .onLongPressGesture { selectedDate = calendarDate showModal = true } } } } .background(Color.gray) .sheet(isPresented: $showModal) { if let date = selectedDate { DateSelectionModal(selectedDate: date) } } } } struct GridStack: View { let rows: Int let columns
Topic: UI Frameworks SubTopic: SwiftUI
2
0
195
Feb ’25
SwiftUI Table column widths cannot be saved
I have a macOS app made with SwiftUI where I want to show a list of data in a tabular fashion. SwiftUI Table seems to be the only built-in component that can do this. I would like to let the user size the columns and have their widths restored when the app is relaunched. I can find no documentation on how to do this and it does not seem to be saved and restored automatically. I can find no way to listen for changes in the column widths when the user resizes and no way to set the size from code. For a macOS app it seems that the only way to set the width of a column is to use e.g. .width(min: 200, max: 200). This in effect disables resizing of the column. It seems that idealSize is totally ignored on macOS. Any suggestions?
2
0
381
Feb ’25
Not able to view PDF on a website when I open it in Safari browser.
When you open the Directorate General of civil Aviation, India website then in the top bar bring the cursor to “Regulations and Guidance” under that there will be a drop down which will give numerous options. In that go to Centre Column “Civil Aviation Requirements”. Then click on ”Section 7” then click on “Part II”. Actually on a laptop it’s a 4 page document but on my iPad it’s just an image of the first page. I can’t read any of the PDF’s.
Topic: Safari & Web SubTopic: General
2
0
189
Feb ’25
Fatal Error in Swift Playground
Fatal Error in Swift Playground Description I'm experiencing a catastrophic error when importing Package Dependency in any Swift Playgrounds that has icon or name that caused the whole Playground won't work anymore with error messages below. I'm current running macOS Sequoia 15.3 (24D60) and Swift Playgrounds 4.6.1. They're all up-to-date. Reproduction Open Swift Playgrounds and and create a new project. Import a package dependency https://github.com/simibac/ConfettiSwiftUI.git Rename the project and add an icon Then you should able the reproduce the problem. I strongly believed that this is a serious bug. You'll find that Assets in the left column are disappeared and appeared Assets.xcassets, you're unable to reveal the Dependency in the column like the reference picture above. The whole Playground is destroyed now and unable to work anymore.
2
0
523
Feb ’25
Correct way to label TextField inside Form in SwiftUI
Hello everyone. I'm building a simple Form in a Multiplatform App with SwiftUI. Originally I had something like this. import SwiftUI struct OnboardingForm: View { @State var firstName: String = @State var lastName: String = @State var email: String = @State var job: String = @State var role: String = var body: some View { Form { TextField(First Name, text: $firstName, prompt: Text(Required)) TextField(Last Name, text: $lastName, prompt: Text(Required)) TextField(Email, text: $email, prompt: Text(Required)) TextField(Job, text: $job, prompt: Text(Required)) TextField(Role, text: $role, prompt: Text(Required)) } } } #Preview { OnboardingForm() } In macOS it looks ok but then in iOS it looks like this: and it's impossible to know what each field is for if all the prompts are the same. I tried adding LabeledContent around each text field and that solves it for iOS but then on macOS it looks like this: The labels are shown twice and the columns are out of alignment. I think I could get around it by d
2
0
1k
Feb ’25
Reply to libncftp v. macOS Native curl with Secure Transport APIs and Session Reuse
But, just to confirm, that means that can reproduce this with a server under your control, right? If so, that’s definitely a progress. Confirmed. A correlating factor seems to be those servers written against OpenSSL, possibly running on Linux. See below. OK. And cases 1 and 2 (curl with Secure Transport, and Fetch 5.8) work whereas case 3 (your libncftp code) fails, right? Confirmed. FTPS Server Secure Control-only Secure Control+Data test.rebex.net Custom .NET Implementation ✅ ✅ Microsoft FTP Service ✅ ❌ proftpd ✅ ❌ pureftpd ✅ ❌ vsftpd ✅ ❌ Until I added code to utilize SSLSetPeerID, Secure Control+Data was ❌ up and down that column. Adding code to work with SSLSetPeerID allowed the test.rebex.net Custom .NET Implementation to work on stop responding with 425: Cannot secure data connection - TLS session resumption required. on attempting to establish the secure data channel session.
Topic: Privacy & Security SubTopic: General Tags:
Feb ’25
SwiftData integration for coexistence with CoreData Error: Persistent truncated
When integrating SwiftData for an already existing app that uses CoreData as data management, I encounter errors. When building the ModelContainer for the first time, the following error appears: Error: Persistent History (184) has to be truncated due to the following entities being removed (all Entities except for the 2 where I defined a SwiftData Model) class SwiftDataManager: ObservableObject { static let shared = SwiftDataManager() private let persistenceManager = PersistenceManager.shared private init(){} lazy var modelContainer: ModelContainer = { do { let storeUrl = persistenceManager.storeURL() let schema = Schema([ HistoryIncident.self, HistoryEvent.self ]) let modelConfig = ModelConfiguration(url: storeUrl) return try ModelContainer(for: schema, configurations: [modelConfig]) } catch { fatalError(Could not create ModelContainer: (error)) } }() } @Model public class HistoryIncident { var missionNr: String? @Relationship(deleteRule: .cascade) var events: [HistoryEvent]? public init(){} } @Model class
1
0
661
Feb ’25
Reply to Correct way to label TextField inside Form in SwiftUI
I've never needed to do this, but I've had a quick look, and this seems reasonable: var body: some View { VStack(alignment: .leading) { Form { Text(First Name) TextField(, text: $firstName, prompt: Text(Required)) Text(Last Name) .padding(.top, 10) TextField(, text: $lastName, prompt: Text(Required)) Text(Email) .padding(.top, 10) TextField(, text: $email, prompt: Text(Required)) Text(Job) .padding(.top, 10) TextField(, text: $job, prompt: Text(Required)) Text(Role) .padding(.top, 10) TextField(, text: $role, prompt: Text(Required)) } .formStyle(.columns) .padding(.horizontal, 16) .padding(.vertical, 16) Spacer() } } The key is .formStyle(.columns).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’25
Create ML Trouble Loading CSV to Train Word Tagger With Commas in Training Data
I'm using Numbers to build a spreadsheet that I'm exporting as a CSV. I then import this file into Create ML to train a word tagger model. Everything has been working fine for all the models I've trained so far, but now I'm coming across a use case that has been breaking the import process: commas within the training data. This is a case that none of Apple's examples show. My project takes Navajo text that has been tokenized by syllables and labels the parts-of-speech. Case that works... Raw text: Naaltsoos yídéeshtah. Tokens column: Naal,tsoos, ,yí,déesh,tah,. Labels column: NObj,NObj,Space,Verb,Verb,VStem,Punct Case that breaks... Raw text: óola, béésh łigaii, tłʼoh naadą́ą́ʼ, wáin, akʼah, dóó á,shįįh Tokens column with tokenized text (commas quoted): óo,la,,, ,béésh, ,łi,gaii,,, ,tłʼoh, ,naa,dą́ą́ʼ,,, ,wáin,,, ,a,kʼah,,, ,dóó, ,á,shįįh (Create ML reports mismatched columns) Tokens column with tokenized text (commas escaped): óo,la,,, ,béésh, ,łi,gaii,,, ,tłʼoh,
6
0
824
Jan ’25
Reply to Embedding a NavigationSplitView inside a NavigationStack
NavigationSplitView and TabView are top level navigation containers and could have unexpected behaviors when they're not implemented as such. on iOS, a NavigationSplitView collapses all of its columns into a stack.So it's best practice to prefer using a split view in a regular — not a compact — environments. Please file an enhancement request using Feedback Assistant. Once you file the request, please post the FB number here. If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?
Topic: UI Frameworks SubTopic: SwiftUI
Jan ’25