Questions tagged [nsview]

NSView Implements basic drawing, event handling and printing behaviors for applications. Usually application code define subclasses of NSView to provide richer implementations. Belongs to the Foundation framework for Cocoa and Cocoa Touch.

The NSView class defines the basic drawing, event-handling, and printing architecture of an app. You typically do not use NSView objects directly. Instead, you use objects whose classes descend from NSView or you subclass NSView yourself and override its methods to implement the behavior you need. For any view object, there are many methods that you can use as-is.

1639 questions
0
votes
1 answer

NSView Instantiation and Get Its Values with Identifier

I have a subclass of NSView named clickView as follows. // clickView.h @interface clickView : NSView { BOOL onOff; } - (BOOL)getOnOff; // clickView.m - (BOOL)getOnOff { return onOff; } - (void)mouseDown:(NSEvent *)event { if (onOff)…
El Tomato
  • 6,479
  • 6
  • 46
  • 75
0
votes
1 answer

subview of IKImageView appears below image instead of above

I have a IKImageView and a NSImageView as a subview. Subviews are supposed to get drawn above their master view. I tried an NSImageView with the same subview, and it worked fine, but I really need to be able to move the image around with the mouse,…
pvinis
  • 4,059
  • 5
  • 39
  • 59
0
votes
0 answers

NSView not fire keyEvent

I have made a custom NSView and have implemented the keyDown: method. However, when I press keys the method is never called. How can I receive those event ? I had override keyDown: method in my custom view - (void)keyDown:(NSEvent *)theEvent { …
ravi
  • 120
  • 1
  • 10
0
votes
1 answer

How do I do something after the next NSView -layout has occurred?

In response to a user event, I want to: add a new NSView to the window, and then show an NSPanel positioned just below that view I have each half of this done. I can add a new subview, and the container view's -updateConstraints identifies it and…
user3277676
  • 143
  • 1
  • 5
0
votes
2 answers

Drawing a transparent NSView in NSWindow with black background

I have a NSView inside a NSWindow and the background of NSWindow is set to black (with alpha of 0.7). Is there anyway to have the NSView showing what's underneath the NSWindow? In other words, how do I make the part where NSWindow and NSView overlap…
revolver
  • 2,385
  • 5
  • 24
  • 40
0
votes
1 answer

Correcting NSView Memory Leak

I need some help understanding what's causing a leak in my app. App uses ARC. I have an NSView on a window functioning as a drop zone for files. When you drag a file onto the window I pick up the path and the file name to use in other aspects of the…
Paul
  • 189
  • 10
0
votes
0 answers

Mac OS X app crashes when trying to access [NSView nextResponder]

a NSTableView uses MyTableRowView (a custom NSView subclass) as content: - (NSView *)tableView:(NSTableView *)tb viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { ... MyTableRowView *rowView = [[MyTableRowView alloc]…
Andrei Herford
  • 17,570
  • 19
  • 91
  • 225
0
votes
1 answer

NSProgressIndicator - white corners

I'm using https://github.com/kelan/yrk-spinning-progress-indicator to get a white colored spinner. Note that this is not a subclass of NSProgressIndicator, but instead a custom NSView. The problem is that the corners of this custom view are showing…
user429620
0
votes
1 answer

Custom NSView in a NSScrollView that takes up the whole visible space

I have a custom NSView subclass, and I put it in a NSScrollView, and the basics are working fine. It always takes up the full width of its available space, so its constraints take up the whole width of the scroll view. How much vertical space it…
0
votes
0 answers

Drawing leaves trails when resizing window

I am trying to draw a box in custom view. I have the points for the corners of the box and they are scaled. If I put a small rectangle at each vertex on the box and the resize the window it works perfectly. If I use [path stroke] to draw the lines…
Aubrey Todd
  • 113
  • 1
  • 9
0
votes
1 answer

Draw image background in NSView under transparent elements

I want to draw image background in NSView and place some elements which also have transparent background on top of it. I've overrided draw rect of NSView: - (void)drawRect:(NSRect)rect { [NSGraphicsContext saveGraphicsState]; NSImage *image =…
Denis Kildishev
  • 709
  • 2
  • 7
  • 15
0
votes
1 answer

Can't connect IBOutlet to header file

I have started an Objective-C application, I created a custom NSView class and assigned it to the NSTableView's view. But now I can't connect any IBOutlet to the header file of this class, how can I resolve that? Thanks a lot for any help…
Jeremiah Smith
  • 740
  • 6
  • 17
0
votes
0 answers

NSImageView Performance

I have a very simple Mac Application; the best way to think of it is a master/detail view. Once an item is chosen on the left-hand side, information appears on the right pane, along with an image (can be various sizes/formats/resolutions due to the…
kalikkalik
  • 187
  • 8
0
votes
3 answers

Property Editor Control for Cocoa?

Is there any Cocoa Widget which i can use to build a typical (well except in Interface Builder) GUI builder property inspector like RealBasic or Delphi has? And is there a website where additional 3rd party Cocoa widgets are listed?
Lothar
  • 12,537
  • 6
  • 72
  • 121
0
votes
1 answer

NSView capture mouse movement after exceeding bounds

I know the title isn't well chosen, but I didn't know how to describe it better... I have an instance of NSView that I add to a window at the right screen edge: CGRect zoneFrame = CGRectMake(screenFrame.size.width - 50, 0, 50,…
Julian F. Weinert
  • 7,474
  • 7
  • 59
  • 107