I'm trying to make a fairly simple customer counter application for my Mac (running High Sierra 10.13.6).
I have Xcode 10 installed, but I'm really struggling with how to do, well, much of anything with it. I can't seem to find any beginner tutorials for Xcode 10 (and what little I do finds seems to focus on iOS development, not macOS development).
So far I've been able to make a Storyboard view of what I want the GUI to look like, but I can't figure out how to map any functions to the elements I've added.
Here's a quick explanation of what I want the application to do. The user enters a couple numeric values, presses a button, and then a couple timers start with custom increments per second based on the values initially entered.
This seems really basic, and I'm guessing I'm missing something really obvious. Seems like it should be as simple as:
- Store entered values as variables
- Start running a looping function to do some math after the button is pressed, storing new values to new variables as it runs
- Update text in the window once per second with the new variables
I was able to sort out my problem.
- I had to right-click on ViewController.swift then select Open in a New Window.
- From there, I was able to right-click on elements from my Storyboard and (while continuing to hold the right mouse button) drag a connector over to an individual line in the View Controller window.
- This opened a little pop-up that allowed me to link to the Storyboard element as an "outlet" (variable) or an "action" (function).
Pretty weird and hidden way to link things, but after that I was able to learn some basic coding and make everything function as desired.