Skip to content

Adjusting the Bundles

Simone Martorelli edited this page Feb 8, 2021 · 2 revisions

Adjusting the application bundle lists requires working in both interface builder and the code editor. The required files are StackItems.storyboard, AppBundleConstants.swift, as well as the ViewController.swift documents for each app bundle.

A view of interface builder displaying StackItems.storyboard:

  1. interface builder displaying each view corresponding to a app bundle list
  2. the identity inspector displaying the class assignment. this class corresponds to the swift file containing the code for that view controller.
  3. each of the bundle view controllers contains a unique storyboardID assignment
  4. additionally a unique label

  1. select the stack item view controller you wish to edit
  2. click the connection inspector to display the connections between interface objects and code

By hovering over a connection in the connection inspector, you can see the corresponding interface object highlighted. Coincidentally, if you have the code editor visible along with interface builder and hover over a connection in the code editor, it will be highlight in interface builder.

To remove an app from the bundle selected, click the x's adjacent to each connection in the connection inspector corresponding to app's placement in the list. Be aware that each app has both a title label and progress indicator as part of the listing.

  1. select the stack item view controller you wish to edit
  2. click the show assistant editor button to split the IDE to display both interface builder and the code editor.

Each app has multiple objects will you will need to take into account (remove or add depending on whether you are reducing or increasing a bundle's contents):

  • textLabel: NSTextField! = an app's title string interface builder reference
  • progressIndicator: CircularStatus! = an app's corresponding progress indicator interface builder reference
  • anchorStop = position marker for the app's progress indicator to hold it in place as it rotates
  • progressIndicator .state value = initial state for the progress indicator
  • textLabel stringValue = an assignment for the textLabel to take the value of AppBundlesConstants.Bundle.letter.InfoPopover.titles[index value]
  • an updateUIAppStatus constructor

Be sure to adjust the arrays for the bundle popovers in AppBundleConstants.swift struct. This will remedy both the info popover corresponding to the bundle in the App Bundle Selection Child VC as well as the installation view. Each struct contains a list of app titles, descriptions, and icons.

Once the stack item has been adjusted in both the code editor and interface builder, be sure to adjust the view size to tightly wrap at the top and bottom to contain all the app items. This will result in the disclosure view displaying properly.

Clone this wiki locally