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..
Search results for
column
2,071 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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:
I am building my 2nd React-Native app which is a very simple Notes app. The functionalities are to be able to add, edit & delete notes. And, on the home page where the user can change the orientation of the notes to be in 2 column like a grid or just a list. My app has been getting rejected for Minimal design guideline & I don't know what to do to make it more complex. My first iOS React-Native app was just a single-page Weather app, again that was pretty simple. So, my question is what do I do? OR is the trick that I just keep doing little changes and try to submit & see which one gets accepted??
I'm making a macOS app using SwiftUI. I have a Table view. I have selection enabled but I can't find any way to customize the selection color - it's always blue. My table looks something like this: Table(of: MyObj.self, selection: $selectedID, sortOrder: $sortOrder) { TableColumn(Column Name) { obj in // do some custom view } . . . } rows: { Foreach (model.items) { obj in TableRow(obj) } }
I've been struggling with this for a while now. To start off with, I am using a custom NSTextLocation as the element range on a NSTextParagraph. NSTextParagraph is a subclass of NSTextElement and both have limited public elements that can be set. From what I can see, the only thing we can set on NSTextParagraph is an NSAttributedString. It has a few other elements it inherits from NSTextElement - primarily textContentManager and elementRange. Seems simple enough...but, there is obviously something wrong with what I am doing. If we use NSTextStorage as our backing store, then the text ranges it uses is a private type NSCountableTextLocation. Being a private type, I imagine we have to implement our own NSTextLocation to use in the ranges that are set on the NSTextElement. But, for some reason, when I have multiple text elements, TextKit compares my custom NSTextLocation against a NSCountableTextLocation and crashes. -[NSCountableTextLocation compare:] receiving unmatching type (3, 1) (3,1) here being the debug
SwiftUI Table on macOS with two columns. In some test code the items being sorted are: @Observable final class Item: Identifiable { let id: Int var displayId: String { String(id) } let description: String init(_ id: Int) { self.id = id self.description = UUID().uuidString } } The table columns are displayId and description. The Tables initial sort order is defined by this descriptor: var sortOrder = [KeyPathComparator(Item.description)] The strangeness is this: the sorted description order is very strange. 0B5... sorts before 0B0... ? Or if I reverse the sort order I get this: AA... before FF... What am I missing? Sorting the first column does what I'd consider to be the right thing, showing the column in numerical order even though I'm using the String representation of id.
Hi there, I'm working on an app that provides the user a prompt. They have to select the matching button. These butttons are created in three separate rows using three forEach loops acting on a customised button made from a Struct. ForEach(0..<10) { column in AlphabetButton( gameViewModel: gameViewModel, letter: String(alphabetTop[column]), borderColor: $borderColor.wrappedValue, onTap: buttonTapped) }} alphabetTop is an array storing letters used as the buttons label and value, and there are two other arrays with the other letters. What I'm wondering, is if the user presses a button that doesn't match the prompt. How can I make reference to the button that does match the prompt. For example, I want to make the border of that correct button flash Orange if the wrong button is pressed. I am making a keyboard app as a bit of practise in learning SwiftUI, so any assistance you can provide would be most helpful. One potential solution I've thought of, do I make the buttonTapped function, chec