I am trying to get SwiftUI views to move from one position to another using animation. I know that when the identity of the views change this often result in a fade instead of an animation but I do not believe this is happening in my case. Below is a simple example program with four views from a 2D array (the 2D array is important). There is a button to rotate the views clockwise. I tried using two ForEach blocks but I cannot use it on the outer one because the row arrays does not conform to Identifiable. I also changed my code to write out the views explicitly without the ForEach blocks but I get the same result: The column changes animate as movement but the row changes animate as fades. How do I get it to animate all four views moving clockwise? import SwiftUI struct Block: Identifiable { var id : Int = 0 } struct Board { let numRows = 2 let numCols = 2 var blocks: [[Block]] init() { blocks = Array(repeating: Array(repeating: Block(), count: numCols), count: numRows) for row in 0..
Search results for
column
2,061 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
We're trying to implement a file locking mechanism to prevent multiple users from editing the same file at the same time causing conflicts. Our previous implementation worked well on Ventura, but on Sonoma, even when just previewing a file in Finder in Column View, as opposed to editing, it locks. This is the same behaviour we experienced with Apple's FruitBasket sample code. There is a isFileViewerRequest flag inside the NSFileProviderRequest object provided with the NSFileProviderReplicatedExtension enumerator function. We thought this would indicate a file being edited. After further investigation, we were told that the isFileViewerRequest flag just indicates if a file is being presented, not just edited. We find the intended behaviour a bit strange, why would anyone want an icon next to a file to indicate presented? Why is the behaviour working fine on Ventura as a locking mechanism but on Sonoma it can only be considered a presented mechanism? If the intended behaviour is to indicate a file bein
In WWDC2020, the video Synchronizing a local store to the cloud shows some data fields in the left column of the dashboard, such as CD_post, CD_Tag, where did these come from? need to create it manually on dababoard, or it synchronize from the demo app ? why do I run this corresponding demo, but there are no data fields in the dashboard of my account and my dashboard of my account is almost empty?
It would be much easier to debug if you provided your document, your explanation of what you are trying to achieve is not super clear to me. I assume you start with no data in sheet 2 and you don't care that I'm overwriting data in sheet 2 - is this true? Anyway, please go through this code and read the comments. It takes maybe 2-3 minutes on my computer to finish the script. tell application Numbers activate -- the following code is just to show you how do I think your document looks like make new document tell front document -- there should already be one sheet, let's rename it to GAMES set name of active sheet to GAMES -- create sheet TRIALS2 -- this should also create table 1 make new sheet set name of active sheet to TRIALS2 -- making sure table 1 has at least 67 rows, otherwise we cannot access row 67 if (row count of table 1 of sheet GAMES < 67) then set row count of table 1 of sheet GAMES to 67 end if -- making sure table 1 has at least 2 columns, otherwise we cannot access column
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
With the deprecation of the airport binary in macOS 14.4 I am re-writing my own network tool to directly use CoreWLAN. In doing this and testing and comparing to previous results from the Apple airport binary under various versions of macOS I believe CoreWLAN has a 'bug' which as a result was exhibited in the Apple airport binary and equally my own code. As detailed below. This applies to the release version of macOS 14.4 (23E214) macOS Sonoma 14.3.1 and previous versions of macOS going back many, many years have included an official Apple binary at the following location. /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport Whilst this is now officially deprecated in macOS 14.4 it is obvious that this tool will have itself been utilising the official Apple framework CoreWLAN. As part of the process of re-writing my own tool which formerly used the above Apple binary, I have re-written my tool to directly utilise CoreWLAN myself via the Objc interface. In doing this I have been
I have a tableview with a column which has an inner tableview. I want to change height of the outer tableview to match the height of the inner tableview. outerTableView.reloadData() let range = outerTableView.rows(in: summaryTableView.superview!.visibleRect) outerTableView.noteHeightOfRows(withIndexesChanged: IndexSet(integersIn: range.lowerBound..
I have an uncommon scenario here. outer tableview +--------------------------+ | column 1| inner tableview| +--------------------------+ Now most often the out tableview has many rows and vertical scrollbar visible. When user try to scroll vertically in the inner tableview but it has no vertical scrollbar (because it has only a few items), I want the scroll event sink into its parent view or better outer tableview, so that user does not have to move cursor to first column in outer tableview and scrolls. Is this possible?
Have you considered that there may be space between columns? See the intercellSpacing property.
Topic:
UI Frameworks
SubTopic:
AppKit
Tags:
Maybe my question is too general. I have a need to calculate all width of an NSTableView. However, I found that total width of all columns is far less than NSTableView.bound.width: let width = tableView.tableColumns.reduce(0) { ac, col in ac + col.width } print(width, tableView.bounds.width) This is true even I manually adjust last column so that it fills the gap between the column and tableview right border. -----------| <- table right border last column| -----------| So I assume NSTableColumn.width and NSView.bounds.width are using different units.
Topic:
UI Frameworks
SubTopic:
AppKit
Tags:
Xcode 15 does not show Version and Build settings for app extensions in Project > Targets > target > General any more. In Xcode 14 I have been manually changing those versions to keep them in sync (and avoid warnings or errors). Moving the setting from target level to project level as suggested by Eskimo from Apple fixed the problem (and simplifies the workflow so that I do not need to manually keep the versions in sync). How to move the settings? Go to Project > main target > Build Settings. Enable Levels. Enter CURRENT_PROJECT_VERSION into Filter. Edit the value for the project level (double click on the empty value in the project column). Remove the value for the main target level (single click the value in the target column, press Delete key on keyboard). Similarly for the MARKETING_VERSION. Enter it into Filter, enter the value for the project level, remove it from target level. Then, for each app extension target (Project > an app extension target > Build Settings)
Topic:
App & System Services
SubTopic:
General
Tags:
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
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
I am trying to write a script that will perform an operation in Numbers document TEST on sheet GAMES (it’s a bunch of random number generations for a game show simulator) look at the output in cell B66 of that sheet, output it in cell B3 on another sheet called TRIALS2 then perform the operation again and output the new result on sheet TRIALS2 in cell B4 and so on for 2000 repeats. Here’s the script I have but I get an error message. The document is open and I have confirmed all the document and sheet names are correct. There is definitely something in cell B66 of Sheet GAMES in document TEST. What am I missing? tell application Numbers activate tell document TEST repeat 2000 times tell sheet GAMES set inputValue to value of cell B66 end tell tell sheet TRIALS2 set table1 to table 1 set outputColumn to column B set nextRow to (get cell (3 + (count of rows of table1)) of outputColumn) set value of nextRow to inputValue end tell end repeat end tell end tell Here is the error message: error Numbers got
I calculate cell view's width in func tableView(_ tableView: NSTableView, sizeToFitWidthOfColumn column: Int). I have a need to resize the tableview's width to just match total width of all cell views' (without scrollbars). But it seems changing tableview's width does not work: tableView.bounds.size = CGSize(width: w, height: tableView.bounds.height) I suspect that I should change its clipping view or enclosing scrollview, but don't have any idea on this. Any help?
So juts a simple program im trying to make. User selects a count of rows... generates a grid with that many rows by 4 columns, each box is labeled 1,2,3,4 respectively from left to right of the columns. Rows are labeled, pick and the # that was entered by the user respectively, ie: pick 1, pick 2, pick and so on til it meets the count of rows... The boxes are clickable when clicked the box that starts white with black number, then turns black with red number, if its clicked again it returns to normal... User can go through grid and click selected boxes in each row and when satisfied can hit confirm --- the above ive already done its the next part im having issues with. So when i ht confirm and create a sheet it only shows 2 of the 4 boxes inside the results sheet. Before it showed all of them but i wanted the results to be larger so i could like see it from a far. Basically when confirm is clicked i want it to start with row 1 or (pick 1) and show the 4 boxes on how the user chose to click o
According to the following article: https://serialcoder.dev/text-tutorials/swiftui/navigation-view-style-in-swiftui/ Use the columns navigation view style to have two panels side by side on iPhones with screens big enough to show two panels. NavigationView { … } .navigationViewStyle(.columns)
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: