Search results for

column

2,047 results found

Post

Replies

Boosts

Views

Activity

Reply to NavigationSplitView sidebar animation lag with minimum width
@captmagnus You should try using navigationSplitViewColumnWidth(min:ideal:max:) to set the preferred width for the column and .windowResizability(.contentSize) for the resizability strategy. For example: WindowGroup { ContentView() } .windowResizability(.contentSize) struct ContentView: View { @State private var columnVisibility = NavigationSplitViewVisibility.all var body: some View { NavigationSplitView(columnVisibility: $columnVisibility) { Text(Sidebar) .navigationSplitViewColumnWidth(min: 300, ideal: 300) } detail: { Text(Detail) .navigationSplitViewColumnWidth( min: 600, ideal: 600, max: 900) } .onChange(of: columnVisibility) { print(columnVisibility) } } } It's also worth filling a bug report for the animation hitch. Bug Reporting: How and Why? has tips on creating your bug report. Post the FB number here once you file the bug report.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’25
Adding ‘Test diamonds’ to Xcode with a macro
I'm currently writing a macro which outputs Swift Testing code: // Macro code ... @MainActor @SnapshotSuite struct MySuite { func makeView() -> some View { Text(a view) } } which expands to... // Expanded macro code ... @MainActor @Suite struct _GeneratedSnapshotSuite { @MainActor @Test(.tags(.snapshots)) func assertSnapshotMakeView() async throws { let generator = SnapshotGenerator( testName: makeView, traits: [ .theme(.all), .sizes(devices: .iPhoneX, fitting: .widthAndHeight), .record(false), ], configuration: .none, makeValue: { MySuite().makeView() }, fileID: #fileID, filePath: #filePath, line: 108, column: 5 ) await __assertSnapshot(generator: generator) } } In short, this macro creates snapshot tests from a function. This all works but I'm finding a couple of limitations, potentially with how Macros are expanded in Swift. Xcode diamonds are not visible The snapshots tag isn't discovered There are a couple of things worth noting though: The suites and tests are discovered in Xcode's Test Navi
1
0
266
Mar ’25
Reply to How to access comments and their associated text in iWork documents via AppleScript/ScriptingBridge?
Could be useful for someone, here's an example of script for Numbers to manipulate the content, cells and rows with placeholders: set newList to {} repeat with anItem in theList set newList to {anItem} & newList end repeat return newList end reverseList on replaceText(theText, searchString, replacementString) set AppleScript's text item delimiters to searchString set textItems to text items of theText set AppleScript's text item delimiters to replacementString set newText to textItems as text set AppleScript's text item delimiters to return newText end replaceText tell application Numbers tell document TestNum repeat with s in sheets tell s repeat with t in tables -- Create a static list of row indices set totalRows to count of rows of t set rowIndices to {} repeat with i from 1 to totalRows copy i to end of rowIndices end repeat set revIndices to my reverseList(rowIndices) repeat with iRef in revIndices set rowNum to iRef as integer -- Directly use row rowNum of t to access the row set numCells to count
Feb ’25
Unable to validate with app sandbox issues
My app is a Safari extension. When trying to validate the app, I get the following error: App sandbox not enabled. The following executables must include the com.apple.security.app-sandbox entitlement with a Boolean value of true in the entitlements property list: [( app.rango.Rango.pkg/Payload/Rango for Safari.app/Contents/MacOS/Rango for Safari )] Refer to App Sandbox page at https://developer.apple.com/documentation/security/app_sandbox for more information on sandboxing your app. I don't know why this is happening. I have app sandbox enabled in both the app and the extension target. I have both entitlement files. When executing codesign -d --entitlements :- /path/to/binary I get the following: com.apple.security.app-sandboxcom.apple.security.files.user-selected.read-onlycom.apple.security.get-task-allowcom.apple.security.network.client If I check on Activity Monitor, on the sandbox column it shows true. I have no idea why I keep getting this error when all indicates that the app is actually sandb
4
0
502
Feb ’25
Reply to Initialize metal shading language 3x3 matrix
Nowadays the metal shading language specification states that it's possible, but still it doesn't specify the order, section 2.3.2 Matrix Constructors says: Since Metal 2, a matrix of type T with n columns and m rows > can also be constructed from n * m scalars of type T. The following examples are legal constructors: float2x2(float, float, float, float); float3x2(float, float, float, float, float, float); I'm too lazy to bounce data to the shader and back just to check, but I'd appreciate if anybody who knows would answer to the initial question, and even better would make a clarification in that document BTW the document: https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf
Topic: Graphics & Games SubTopic: General Tags:
Feb ’25
metadata file in .itmsp file (Transporter)
I am attempting to upload an application to the app store. The selected method was using Transporter through terminal commands. In this sense, I keep receiving a metadata error which is as follows : Command (Assume values are filled in) /usr/local/itms/bin/iTMSTransporter -m upload -u MY_EMAIL -p YOUR_APP_SPECIFIC_PASSWORD -f /Users/isseyyohannes/Desktop/ALGORA_Performance.itmsp --asc-provider GL5BCCW69X -v detailed I receive the following error Package Summary: 1 package(s) were not uploaded because they had problems: /Users/isseyyohannes/Desktop/ALGORA_Performance.itmsp - Error Messages: ERROR ITMS-3000: Line 9 column 25: element data_file incomplete; missing required elements checksum and size at XPath /package/software_assets/asset/data_file ERROR ITMS-3000: Line 12 column 24: element software_metadata not allowed here; expected the element end-tag or element metadata_token at XPath /package/software_metadata ERROR ITMS-3000: Line 13 column 19: element software not allowed h
1
0
423
Feb ’25
Reply to metadata file in .itmsp file (Transporter)
UPDATE : I was able to narrow down my metadata errors vaslty. The only error that sustains is as follows. Package Summary: 1 package(s) were not uploaded because they had problems: /Users/isseyyohannes/Desktop/ALGORA_Performance.itmsp - Error Messages: ERROR ITMS-3000: Line 16 column 15: element versions not allowed here; expected the element end-tag or element metadata_token at XPath /package/versions ERROR ITMS-3000: Package null failed schema validation. [2025-02-20 12:23:44 EST] DBG-X: Returning 1 This is the structure of my metadata file. GL5BCCW69X GL5BCCW69X ALGORA_Performance.pkg ALGORA Performance Trading made easy. This app is optimized for macOS trading. Any insight on to what I may be doing wrong in my metadata.xml file would be appreciated. Thank you. Note : md5 was hidden on purpose.
Feb ’25
[bug report] Unicode characters with "Variation Selector-15" (U+FE0E) are not rendered as text in iOS 18.1.1
I reported this bug one year ago in https://developer.apple.com/forums/thread/746406, but as it is not been fixed yet, I'm going to try by opening this new incident report. iOS is not working for the Unicode Variation Selector-15 (U+FE0E) for all the characters. Can you please apply that variation selector to all your Unicode characters? I) Steps to reproduce the issue: navigate in safari to the page https://eurovot.com/vs.htm II) Expected result: as the 1st column of characters have the Variation Selector-15 (U+FE0E) applied, and the 2nd column have the Variation Selector-16 (U+FE0F) applied, the first column should always display text characters (in orange) and the second column emoji characters. III) Error result: some characters are working fine in the 1st column and displayed as text (in orange colour), but some other aren't displayed as text, they wrongly displayed as emojis instead.
Topic: Safari & Web SubTopic: General
2
0
472
Feb ’25
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
255
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
176
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
331
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
172
Feb ’25