Chapter7 Time-ato application

The application Time-ato why not use SwiftUI?

See section 7.3 called “Why AppKit?”

I’m a macOS programmer for many years. I’m happy to see the first book focus on macOS using SwiftUI.
There are a lot of concepts difference between macOS and iOS.

  • manipulate Window
  • menu bar
  • tool bar
  • responder chain
  • mouse event
  • table view
  • outline view
    .
    .
    .

How long can I continue access this book when you release a new version, If i buy it?
Do you have plan adding more topics in this book?
thanks

I haven’t thought about new topics yet, but I hope to keep the book up to date with new versions of macOS. If Apple adds new features, then I will certainly think about putting them in the book.

As regards on-going access, that depends how you bought the book. I suggest contacting support at raywenderlich.com.

Hi,
THANKS YOU for a fabulous book! I am really enjoying it!

I have an M1 MBP in case this is a hardware generated bug.

I am getting a crash “Thread 1: Fatal error: Range requires lowerBound <= upperBound” in the clearTasksFromMenu method at the for loop.

I checked the code and all seem right.

Any ideas?
Thanks,
Blessings,
–Mark

Ah, Referencing Outlets! YOu are my bane!

I connected the Main menu NOT the Menu! Doh!

Back to this excellent book!

Blessings,
–Mark

Great work finding the problem. It’s easy to get confused with the way you have menus within menu items with menus.

And thank you. I hope you enjoy the rest of the book.

Hi again,

I am trying to change the statusItem?.button?.image = NSImage to a different SF Symbol. When the app launches, it briefly shows the icon I have chosen and then reverts to the systemName timer icon.

I can’t seem to find the place in the code that makes this change. Any ideas?

I am certainly enjoying this book, finishing up chapter 13 now. A brilliant resource! Thank you!

Blessings,
–Mark

Hi Mark,

In TaskManagerExt.swift, there’s a computed property called menuTitleAndIcon which sets the menu icon as well as its text. Change the icon name returned by that to use a different one.

Sarah

Thanks so much.

I kept looking at the code and I finally remembered the computed variable. I had worked out a solution in updateMenu method and the simple change in the computed variable is so much more elegant.

Thanks so much!
Blessings,
–Mark

1 Like