Questions tagged [nstouchbar]

An object that provides dynamic contextual controls in the Touch Bar of supported models of MacBook Pro.

NSTouchBar provides an interface to the 2016 MacBook Pro's 'Touch Bar', a multitouch screen above the keyboard.

See the NSTouchBar documentation for more information.

85 questions
3
votes
1 answer

NSPopoverTouchBarItems in NSScrollView (NSTouchBar)

Is there a way to add an array of NSPopoverTouchBarItems into a NSScrollView? Currently, my view hierarchy resembles the below list. NSTouchBar NSCustomTouchBarItem NSScrollView NSStackView Array of NSButtons The above hierarchy…
Mike JS Choi
  • 1,081
  • 9
  • 19
3
votes
1 answer

Adding Button to NSTouchBar Control Strip

I'm working on a pet project which displays current cryptocurrency prices on the touch bar. I'm a web developer, but not a Swift developer, so it's slow going. https://github.com/sharkattackhq/crypt Right now, the basic functionality is in place,…
Runny Yolk
  • 1,074
  • 3
  • 23
  • 41
3
votes
0 answers

How to avoid calling `awakeFromNib` twice when view uses a separate `xib` for its TouchBar

Background I'm adding a TouchBar to an app. I have a few window controllers that should use the same TouchBar design, adopt the same protocol (say AddWindowCommon), and are designed in their own xib file. I designed my TouchBar in a separate xib…
LaX
  • 453
  • 5
  • 16
3
votes
1 answer

program NSTouchBar with c++

The problem I would like to use c++ to create an application that uses the new macbook pro touch bar. However I am not able to find any really good resources. And apple does not have any docs on using c++ to program the touch bar. What I have done I…
zoecarver
  • 5,523
  • 2
  • 26
  • 56
3
votes
0 answers

App run in background to manage touch bar

I am wondering how I would use swift have one app that manages the touch bar while having another app open and being used. For example an ideal scenario is as follows: 1) The user launches touchBar app (that I have made with swift) and the app icon…
zoecarver
  • 5,523
  • 2
  • 26
  • 56
3
votes
2 answers

What is the right API to use to remap keys in OSX?

I'm looking at Karabiner, the OSX keyboard remapper for Parallels development. According to this issue this is best fixed by filing a bug with Apple. What is the alternative (if any) supported API to create such a functionality?
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
3
votes
1 answer

Touchbar API for web applications

I would like to know if there is a possibility for web applications to make use of the touch bar (like a JS api). The touchbar would be a wonderful way to navigate through a website and surely enough the guys at Apple will have noticed this as…
Armin Hierstetter
  • 1,078
  • 2
  • 12
  • 27
3
votes
2 answers

Touchbar and NSPopover windows

I have a NSPopover window which I would like to add touchbar support to. I've managed to implement touchbar support for a standard NSWindow, but following the same procedure for my popover doesn't result in any touchbar items appearing in the xCode…
glenstorey
  • 5,134
  • 5
  • 39
  • 71
2
votes
1 answer

Allow user customization of Touch Bar in macCatalyst

In a catalyst Swift project a UIViewController subclass creates a TouchBar like this: override func makeTouchBar() -> NSTouchBar? { let touchBar = NSTouchBar() touchBar.delegate = self touchBar.defaultItemIdentifiers = [<>] …
Hans
  • 2,354
  • 3
  • 25
  • 35
2
votes
0 answers

Unable to update NSTouchBar programmatically

I am currently developing a very simple Live Scores MAC OSX app for personal use where I show a bunch of labels (scores) on the touch bar. What I am trying to achieve in a few steps: Fetch live soccer scores from a 3rd party API every 30…
kb_14
  • 267
  • 1
  • 6
  • 18
2
votes
1 answer

Replacing the ESC button on a NSTouchBar

I am building a NSTouchBar for my app using storyboard. I want to replace the ESC button with something else. As usual, there is no doc telling you how to do that. I have searched the web and I have found vague informations like You can change the…
Duck
  • 34,902
  • 47
  • 248
  • 470
2
votes
1 answer

Implement TouchBar functionality in Xcode Playgrounds

How can I implement a NSTouchBar in using only Xcode Playgrounds? I realize that NSTouchBar, and its accompanying methods including makeTouchBar() are contained within the NSResponder class, which is the superclass of NSView, NSViewController,…
Acoop
  • 2,586
  • 2
  • 23
  • 39
2
votes
1 answer

TouchBar don't displayed NSViewController Storyboard

I use Xcode 8.2.1 on macOS 10.12.3 I try to display element on TouchBar with my NSViewController but I can't do it... I have just drag&drop the TouchBar element on my NSViewController element in my Storyboard and add a label but this label is not…
Hugo Fouquet
  • 149
  • 1
  • 2
  • 10
2
votes
3 answers

How to identify actual touchBar hardware is available in an Mac book using obj c?

How to identify actual touchBar hardware is available in an Mac book using obj c code so that i can provide touchbar menu options.
Jeba Moses
  • 809
  • 8
  • 25
2
votes
1 answer

Can a Mac App provide a Touch Bar while in the background?

Some Apple apps (such as Xcode and iTunes) add an item to the Control Strip on the Touch Bar that when selected shows the app's Touch Bar (e.g. Xcode's debugger and iTunes' scrubber) without bringing the app to the foreground. Is it possible for a…
grahamparks
  • 16,130
  • 5
  • 49
  • 43