Skip to main content

All Questions

Tagged with
0 votes
0 answers
42 views

NSHostingView inside table cell view isn't automatically updating row height

When adding a constraint NSHostingController view to a table cell view, the row height isn't automatically adjusted to fit the SwiftUI views content thought I activated usesAutomaticRowHeights on my ...
Florian Karimkhan-Zand's user avatar
0 votes
1 answer
92 views

AppKit NSTextField and AutoLayout : how to set programmatically a specific width?

I'm porting my multi-platform C++ framework to the Mac, leveraging the AppKit in Objective C. Just like in Windows, I'm leveraging the auto layout capabilities of the host which works fine for buttons ...
alphafox75's user avatar
0 votes
0 answers
62 views

How does Auto-Layout resolve constraints internally?

IMPORTANT: I know how to use Auto-Layout. How to use it has been asked before already and this is not a duplicate of that question. Auto-Layout is Apple’s cross-platform constraint-based layout system....
Sjwjsjws shsis's user avatar
-2 votes
1 answer
290 views

NSView-based table view with auto layout grows, but does not shrink rows

I have a NSTableView in view-based mode (not cell-based) with usesAutomaticRowHeights=YES. The rows have dynamic height that might change at any time. This setup successfully grows table view rows (...
user73014's user avatar
1 vote
1 answer
191 views

programmatic NSLayoutConstraint in Mac app resizes window contentView

I'm trying to get auto layout working programmatically in an Objective-C Mac app. The goal pretty basic, a simple toolbar-like view across the top of the window. Height should not change, view should ...
Corbell's user avatar
  • 1,373
4 votes
1 answer
229 views

macOS Window Overlay Effect Bug?

EDIT: I still have not gotten this to work. Would someone mind downloading my simple test project and trying it on their machine? There's just boilerplate code and a storyboard. https://www.dropbox....
user1922718's user avatar
0 votes
2 answers
153 views

Autolayout: conditional content compression resistance priority using NSUserInterfaceCompression

I've created a custom segment control (Cocoa / macOS) by subclassing NSView (does not use any existing controls / buttons; it's an entirely custom view with a complex set of internal constraints) that ...
strangetimes's user avatar
  • 5,163
0 votes
1 answer
514 views

Auto Resizing of NSTableView Content Not Working

Along the same lines as How to Expand NSTableCellView Width When Resizing Column in NSTableView - but the solution there isn't working for me... I've got a Mac app in Xcode 12.3 with some table views ...
Moisie's user avatar
  • 57
0 votes
1 answer
219 views

How can I use Auto Layout in a subview of an NSSplitView?

My question is a duplicate of this question asked 4 years ago, but it was never answered. I have an NSSplitView with two subviews. The right subview has a label I want to center horizontally and ...
Bryan's user avatar
  • 193
3 votes
0 answers
400 views

Animating constraints with layer-backed NSView

I'm attempting to implement an animation that shows/hides a view in a horizontal arrangement. I'd like this to happen with slide, and with no opacity changes. I'm using auto-layout everywhere. ...
Mattie's user avatar
  • 2,998
2 votes
1 answer
837 views

NSTableView using autolayout creates width constraint on cell view

I'm using a view-based NSTableView with Auto Layout turned on. Auto Layout provides the cell views with two horizontal constraints: a Cell_MinX that is tied to its NSTableRowView's leading edge, and a ...
smr's user avatar
  • 1,073
2 votes
1 answer
650 views

Why does NSTextField with usesSingleLineMode set to YES has intrinsic content size of multiline text?

I want to draw single line textfield with default border. So I entered some multiline text into it(just for test for future cases) and set the flags Swift: textfield.usesSingleLineMode = true ...
Nuzhdin Vladimir's user avatar
2 votes
1 answer
456 views

Editable NSTextFields with Variable Height in NSTableView Rows in macOS App

Xcode 10.1, Swift 4.2, macOS 10.14.2 I am trying to make a simple to do list app for macOS where there are a series of NSTableView rows and inside each one is an NSTextField. Each field is a to-do ...
Clifton Labrum's user avatar
4 votes
2 answers
988 views

NSTableView reloadData(forRowIndexes:columnIndexes:) breaks autolayout

I have an NSTableView that can swap in different cell views based on data values for the row. When the model changes, I reload the table, and the table's delegate will provide the right table cell ...
smr's user avatar
  • 1,073
0 votes
1 answer
147 views

Cocoa graphical glitches

I added a Safari tab-like system to my Cocoa application and since, I got some serious graphical glitches. I implemented the tab system in Auto Layout, simply with buttons on a horizontal stack view ...
Béatrice Cassistat's user avatar

15 30 50 per page