nsview
Move NSView around until it hits a border
In a Cocoa-based App i\'m having a canvas for drawing, inherited from NSView, as well as a rectangle, also inherited from NSView. Dragging the rectangle around inside of the canvas is no problem:[详细]
2023-02-28 02:04 分类:问答NSMenuItem custom view problems [duplicate]
This question already has an answer here: Gap above NSMenuItem custom view (1 answer) Closed 8 years ago.[详细]
2023-02-28 01:13 分类:问答Automatically resizing subview created programmatically
I have a NSSplitView. On the left pane of that split view I have an NSTableView and a custom view created programmatically. I\'m using a delegate to make sure my two panes don\'t resize at the same ti[详细]
2023-02-27 11:31 分类:问答NSView drawRect interfering with subviews?
I have an nsview and i use draw rect to draw an image for background. It also has 3 subviews nsbuttons. 开发者_StackOverflow中文版The problem is, whenever the mouse is down on a button, the other butt[详细]
2023-02-27 09:50 分类:问答Way to get beginGestureWithEvent/endGestureWithEvent if window isn't frontmost
Is there a way to get - (void)beginGestureWithEvent:(NSEvent *)event and - (void)endGestureWithEvent:(NSEvent *)event[详细]
2023-02-26 02:44 分类:问答How to put a custom view into an NSImageWell?
I have made what I thought was a perfect start to an image editor. It draws a square wherever you click. My problem is that when you click in a different place, or drag the mouse,开发者_运维问答 it ju[详细]
2023-02-24 23:54 分类:问答NSView mouseExited
I have an NSView and basically, even when my mouse doesn\'t leave the defined frame, just moves within it, mouseExited function is called. Is this how is it suppose to be or am I doing something wrong[详细]
2023-02-24 10:35 分类:问答How to use a custom view correctly?
I have been trying to make a simple drawing program. Recently, I have figured out to draw shapes in a custom view for this purpose. My problem is that I have to draw everything at a single point in ti[详细]
2023-02-24 09:55 分类:问答How do you get the default insets of NSViews and NSControls?
I\'m writing some custom layout code to align some NSViews. I loop through all the views and set their frame.origin.x to the same value (left alignment), but the views don\'t look like they\'re aligne[详细]
2023-02-24 07:11 分类:问答NSImageView not working?
I am trying put an image in a view. This is my code: NSImageView *imView = [[NSImageView alloc] initWithFrame:NSMakeRect(0, 0, 480, 360)];[详细]
2023-02-24 05:37 分类:问答