All Questions
1,110 questions
0
votes
0
answers
43
views
How can I improve NSView rendering performance?
On OS X/Cocoa I have an NSView into which I am drawing an image (when prompted in the drawRect: method). The image is a video camera image that I update around 80 times/second. As measured using ...
1
vote
1
answer
92
views
Add NSView to custom parameter in FxPlug - Swift
I'm developing a plugin for Final Cut Pro, and need help on the UI part. FCPX plugins are swift application bundled in a FxPlug wrapper. The UI is made of parameter views packed together, custom ...
0
votes
0
answers
60
views
Why are NSView frames ignored when set just before an animation block?
I have the following unclear behaviour in MacOS:
When setting multiple NSView frames, and animating them as a next step, the animation block ignores the last set frames.
The host view is a ...
0
votes
0
answers
61
views
NSView display causes immediate drawRect call, but subviews changes not shown untill the next NSApp loop step
I have programmatically created NSButton as subviews of main window NSView, and wish to change button text color while some long processing is running.
[myButton setAttributedTitle:colorTitle];
[...
1
vote
1
answer
97
views
Why this window does not show up at all?
I'm trying to understand how to change data in a variable (var or a label) in between two different views or functions.
I'm migrating from swiftUi, I was used to create stateobject and accessing the ...
0
votes
0
answers
46
views
Stackview can't be resized follow the size of NSView
I'm a newbie programmer in Mac software developing and now there is a problem I cannot solve it.
I want to make a Mac software with simple functions.
It looks like the following screenshots, this ...
1
vote
0
answers
45
views
Returning another NSView subclass in 'initWithCoder' results in error "This coder requires that replaced objects be returned from initWithCoder""
I want to make a backwards-compatible background view for my application (OS X 10.6+) and then use it inside my Application.xib.
I made a subclass of NSView which returns NSVisualEffectView or NSView (...
-1
votes
1
answer
125
views
Rendering OpenGL within an NSView subclass does not render [closed]
I have existing code that uses an NSOpenGLView.
I would like to instead utilise a subclassed NSView controller, and I'm hiting a few walls (not least since OpenGL is long deprecated on Mac. I am ...
0
votes
0
answers
55
views
Issue with NSTextView and NSView key events
I currently have NSView which receives keyDown: events and I haven't had any issues with it until trying to implement NSTextView with it.
However, I am wanting to handle text input with my application....
0
votes
1
answer
92
views
cocoa - Why am I getting blurry fonts when using CALayer versus drawRect for NSView?
I am porting an application from MS Windows to macOS. One primary feature is an "Image Viewer" that displays a rendering of a CCD image (e.g., astronomy picture). On top of this rendering ...
0
votes
1
answer
98
views
Using custom shadow path on NSView
Unfortunately it seems that setting the shadow attributes on the layer directly doesn't work:
let shadowView = NSView(frame: CGRect(x: 0, y: 0, width: 100, height: 100))
shadowView.wantsLayer = true
...
1
vote
1
answer
131
views
How to add subview in NSMenuItem WITHOUT storyboard?
I know there are answers like these, but almost everyone has their menu bar in storyboard. I made it purely in code without using .xib files so I'm not sure how to add a subview to my NSMenu item. My ...
0
votes
0
answers
40
views
NSViewController subclass object is loaded, but its widgets are not loaded into its NSView
I have created a custom view that is intended to be loaded in some different windows. ActionWidgets is a subclass of NSViewController, complete with its own xib file and its own widget contents.
In a ...
0
votes
0
answers
52
views
NSView drawrect flicker
I am using NSView as a digital display screen.
When I invoke
[display setNeedsDisplay:YES]
The view's drawrect function seems to entirely clear the view before redrawing it contents.
This results in ...
1
vote
0
answers
56
views
Mouse Cursor on Layered NSView Cocoa
I have few views, some are siblings, and some are subviews.
I need to have different Mouse Cursors. It works if I have only one view. But as soon as I move to overlapped view or a subview, the ...