Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
-1 votes
1 answer
118 views

NSStackView giving too much space to collection view despite constraints

I have an NSStackView containing an NSImageView and an NSCollectionView. Both of these items are wrapped in their own NSScrollView: Desired behavior I want the collection view to take up only as much ...
Nick K9's user avatar
  • 4,778
0 votes
1 answer
204 views

How can I make window zooming respect auto layout constraints?

To keep things simple, let's say I have a window containing a single view, which has auto layout constraints binding all 4 sides to the window container view with offset 0. And assume that this view ...
JWWalker's user avatar
  • 22.8k
-2 votes
1 answer
313 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
206 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,423
0 votes
0 answers
360 views

Position and size are ambiguous for NSVisualEffectView

I have a vague, and frustrating, auto-layout problem. This occurs in an NSPanel that contains a few buttons, fields, and an NSTableView. The cells of the table view are fairly complex, consisting of ...
James Bucanek's user avatar
0 votes
1 answer
50 views

Are there hidden constraints in auto-layout

I have a complex layout that works perfectly. Now I want to overlay the existing layout with a view that is resizable with, say a 40 pixel margin, relative to the window. When I add a empty custom ...
dcsalmon's user avatar
0 votes
2 answers
161 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,263
0 votes
1 answer
30 views

Cocoa: When a mouse is connected, resizing width constant causes an AutoLayout issue

Cocoa scrollbars change their style when a mouse is connected. I haven't found a way to see their style. I have an NSScrollView which I'm hiding by setting its width constraint constant to 0. If the ...
Tritonal's user avatar
  • 881
1 vote
1 answer
562 views

NSTextView with NSTextTable: Set minimum width with horizontal scrolling?

I have a Cocoa app with a NSTextView. I display a rather large table (made via NSAttributedString, NSTextTable, and NSTextTableBlock). I'd like to achieve the following behavior: Have the table ...
Mark's user avatar
  • 6,997
1 vote
1 answer
611 views

Incorporating old-style view (Audio Unit View) into auto layout

I would like to embed a custom view created by an Audio Unit into a window that uses Auto Layout. After trying dozens of combinations, I still haven't found a way to do this which works with a large ...
Martin's user avatar
  • 211
1 vote
2 answers
1k views

How do I size an NSWindow with auto-layout?

Been trying out the SwiftUI default project code Xcode makes for macOS-based document projects. I moved the window creation code from the NSDocument subclass to a new NSWindowController subclass. It ...
CTMacUser's user avatar
  • 2,072
0 votes
1 answer
114 views

Issues setting constraints on UICollectionViewCell

I created an UICollectionViewCell (.xib) and I just wanted to add a label and some simple constraints there, as such: However, doing this messes up everything. No matter the size I chose on ...
Mykod's user avatar
  • 687
0 votes
2 answers
205 views

Custom View in Cocoa can't draw after setting AutoLayout Constraints

On a MacOS Project. I'm trying to draw a line under a text field (so that by making the text field transparent I can create a "please fill in the blank" style of view that asks the user to input the ...
Mengda Liu's user avatar
0 votes
1 answer
234 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
2 votes
1 answer
565 views

Animate self-sizing NSTableView row height

I have a project that uses self-sizing table view cells. I'd like to animate when the height of a cell changes. NSTableView's noteHeightOfRows(withIndexesChanged:) will do this for view-based cells, ...
smr's user avatar
  • 1,323

15 30 50 per page
1
2 3 4 5
21