In the section in Chapter 10 on adding an action sheet, there is a line in the code that checks if flight.status is ontime or delayed. However, it is flight.flightStatus, not flight.status that is used to display the rows. FlightStatus knows whether flights have departed or not. The result is that even departed flights will display the “check in for flight” button since the list knows it has departed but the button code for the check in button does not.
If I try to change the lines to check if flightStatus is ontime or delayed, however, the app won’t compile due to a problem with the .leading on the VStack or the padding on the font headline. (Perhaps I am just too much of a newbie to understand why this is so.)
I realize this is just a test app, but it still doesn’t seem right to me when you are trying to only add a check in button for appropriate situations.