All Questions
9
questions
2
votes
1
answer
120
views
macOS: resetting balance to center (0.5) using Swift
Due to some bug somewhere, my speaker balance kept moving off-center and it was getting annoying. So I cobbled together the code below (based on this question) which—to my surprise—does compile and ...
3
votes
1
answer
104
views
Break music player into usable components in SwiftUI
I created a music player using swiftUI.I need to ask a question when I break up my player into usable components. How should I take this approach with the music player? because the music player is one ...
1
vote
2
answers
242
views
Trying (and failing) to implement the best conventions on OOP Swift
I'm making a MacOS app that will do some analysis on the user's calendar data. For now it only supports Apple's native calendar (EventKit), but I will later add ...
2
votes
0
answers
415
views
Find MIDI devices with certain names and make them usable
I'm working on a Swift app for macOS, where I take input from MIDI devices and transform that input. The MIDI devices being supported come in for flavors.
What my code does is scan for MIDI devices, ...
2
votes
1
answer
3k
views
Listening to IOKit events with Swift 3
This is my first program in Swift/Xcode. The full source code and xcode project is available in GitHub.
The part I would like reviewed is IOKeyEventMonitor.swift.
...
3
votes
0
answers
6k
views
Multiple View Controllers in a Single Window (Swift on OS X)
As an exercise I want to have a single window application (in Swift on Mac OS X) with 4 views, each controlled by an independent view controller and have their own XIB file. I have working code, but I ...
2
votes
2
answers
3k
views
Frontmost window of the current application that passes a predicate check
After resigning active state (going to the background), the mainWindow property of the main window in the app returns false.
Nevertheless, I need a to find that ...
10
votes
1
answer
22k
views
Pure Swift solution for socket programming
I have spend quite some time now to find out how exactly to do socket programming in Swift (Xcode 6.1). There are a few examples out there, but most of them no longer work for the latest release of ...
6
votes
1
answer
5k
views
Timer UI-updating implementation for educational purposes
I thought it would be helpful to put together an example of what I'm talking about in the second part of my answer to this Stack Overflow question.
The idea is that there's some data that is updated ...