Questions tagged [appkit]

The Application Kit is a collection of classes provided by OpenStep operating systems such as OPENSTEP, GNUstep, and Mac OS X.

The Application Kit is a collection of classes provided by OpenStep operating systems such as OPENSTEP, GNUstep, and Mac OS X.

Apple's reference documentation describes AppKit as follows:

AppKit contains all the objects you need to implement the user interface for a macOS app—windows, panels, buttons, menus, scrollers, and text fields—and it handles all the details for you as it efficiently draws on the screen, communicates with hardware devices and screen buffers, clears areas of the screen before drawing, and clips views.

Reference

1436 questions
-1
votes
1 answer

Xcode project with a certain Product name crashes at launch

After I finished my Xcode project (macOS app), I wanted to change its name, folder names and other stuff... Everything messed up and the project wouldn't build so I decided to save all the project files in a folder, create a new Xcode project and…
PigeonPO
  • 74
  • 8
-1
votes
2 answers

Covering a CALayer with a CGImage

I have a CGImage that I want to show in a CALayer. Setting the content and the gravity to the bottom-left works like expected. layer.contents = cgimage layer.contentsGravity = .bottomLeft Now I want center and cover the full layer. Using .center…
tcurdt
  • 14,518
  • 10
  • 57
  • 72
-1
votes
1 answer

Setting a "grandparent" class in Objective C

I'm creating multiple different UI subclasses which can be created using JSContext, and I'd like them all to inherit a certain set of methods. The classes vary from NSButton to NSTextView. It would be nice to have a single subclass act as NSView…
Tritonal
  • 607
  • 4
  • 16
-1
votes
1 answer

NSButton: blue background

I want to make my NSButton look like Xcode's commit button But there doesn't seem to be any way to easily change the background color for a NSButton. You have to change the 'border' to No, then set the button's backgroundColor, and set the…
Z S
  • 7,039
  • 12
  • 53
  • 105
-1
votes
1 answer

Use same keyEquivalent in NSPopupButton menu as in Main menu

I have an NSPopUpButton that has a few menu items that expose identical functionality to some main menu items. Those are actions most relevant to the users current context. To signal that those items also have keyEquivalents (shortcuts), I wanted to…
user187676
-1
votes
1 answer

NSOutlineView show indentation marker

How do I generate indentation marker for NSOutlineView? I am not sure if this is an inbuilt functionality because it appears in other apps like Instruments Update I tried solving the problem by iterating all the children of the item that the row…
Kaunteya
  • 3,107
  • 1
  • 35
  • 66
-1
votes
1 answer

Migrate a Window special tool to macOS, this tool can modify the attributes of other application

I have a Windows tool, it allows we move cursor, click on any third-party window on the desktop to get their related window handle, then we can use those handles to change the attribute of the third-party window such as alpha, WS_VISIBLE, cloak etc…
Steven
  • 468
  • 4
  • 14
-1
votes
1 answer

How to keep two properties in sync using bind(_:to:withKeyPath:options:)?

I want to keep two properties in sync with Cocoa bindings. In my code, you can see that I have two classes: A and B. I wish to keep the message values in A and B instances synchronized so that a change in one is reflected in the other. I'm trying to…
mistercake
  • 692
  • 5
  • 14
-1
votes
1 answer

How to return an undefined value for NSPoint

I am learning swift and I am trying to make a simple app where I move an object (The default ship) with the keyboard. I am designing an event to represent the left keypress. Since I do not need the mouse to be at a specific place, NSLocation is of…
Louis Couture
  • 72
  • 1
  • 9
-1
votes
1 answer

Setting Multiline Title To NSButton In Cocoa App

I understand the NSButton guidelines for setting title to NSButton, No offence but the requirement should be fulfilled in my case. I want to show NSButton title in two lines. NSButton *btn = [[NSButton alloc] init]; [btn setTitle:@"multiple line…
Vikram Sinha
  • 581
  • 1
  • 10
  • 25
-1
votes
2 answers

Extracting bitmap data from an NSImage in python

I'm constructing wx.MemoryDC using the data from the NSImage, but the resulting code is very sluggish. It seems to me that TIFFRepresentation -> ImageFromStream step is the one that slows things down. Is there any way to avoid this step (all this…
Dmitry Chichkov
  • 602
  • 5
  • 12
-1
votes
1 answer

Tracking Duration of Mouse Event

Is there a way to track the time between a mouseDown and a mouseUp event in swift? Or would one have to implement their own tracker manually?
-1
votes
1 answer

Monitor when app opens file

I am wondering if there is a way to monitor when a user presses open file (cmd+o) in any application. I was thinking I could use addGlobalMonitorForEvents, but I was not sure how to get the specific on "Open File..." event.
zoecarver
  • 5,523
  • 2
  • 26
  • 56
-1
votes
1 answer

How to set NSView Instance Properties

In the NSView class documentation, there is a symbol canDraw that indicates whether drawing commands will produce any results. The declaration is var canDraw: Bool { get } - so anytime you try something such as @IBOutlet weak var myView:…
Jud
  • 1,324
  • 3
  • 24
  • 47
-1
votes
1 answer

systemVersion equivalent for AppKit

Is there a way to get systemName (e.g. macOS or Mac OS X) in AppKit? Essentially, I am looking for a AppKit equivalent of the following UIKit command: [[UIDevice currentDevice] systemName] EDIT: Please note that I am not looking for OS version, I…
Vibhor Goyal
  • 2,405
  • 2
  • 22
  • 35
1 2 3
95
96