Swift辅导 | CSC 214 Homework Assignment #8
Homework Assignment #8
Due: November 17, 2019 at 11:59 PM
This assignment builds on your previous work Vacays. New requirements have come in
as users provided feedback and it is your job to implement everything. The top
complaint was that pretty much everyone hated the ui. So it is your job to spruce things
1 In the detail view pin the snapshot image to the top of
the view and make it somewhat slim. Then embed a table
view in a scroll view and have that extend from the image
all the way to the bottom of the screen. Place all your
detail items in table rows and use differing row heights to
accommodate things like UIPickerViews (date).
2 Showing photography is best done on a black
background. Vacays is white all over. And many disliked
the use of blue. Have the entire app running in black and
show all text in an off-white color to reduce contrast.
3 Items in the master table view should be inset
(specifically images). Rows need to be a bit higher than
standard and it would be nice to differentiate the text
items you are showing with color (i.e. price should have a
different color than the title).
4 People really want to add a rating for their vacations (1-5). You may use the star
images from MediaTracker for that purpose. Make sure to show your ratings in the
master table view.
5 If you copied the sections pertaining to image archiving and unarchiving from the
course slides there are some iOS deprecations in your source code.
In particular unarchiveObject(with:) and archiveData(withRootObject:) were deprecated.
It is your job to fix all of these for the next release. Apple deprecates stuff all the time
and mostly makes things better and safer. Deprecations let you know that things will
stop working eventually (e.g. in iOS 14) and are best dealt with immediately.
Here are a bunch of things we will be looking at when grading.
This is a universal app (iPad, iPhone) and your updating must be seamless. If
something gets updated in the detail view, the master table must immediately follow up.
We showed a nicer way to input and display maps for locations in class. You may opt to
use CLGeocoder for this project as well and allow users to type in their location instead
of having them deal with latitudes and longitudes. There are many other options as well.
Implementing your detail view with a table will make your auto-layout tasks easier, but
still make sure to run your app on all devices and in all orientations.
When dealing with money it is important to be exact. Make sure to format your strings
The detail view should display the title of the vacation. That is easily done with the view
controller’s self.title = vacationItem?.title.
Make it look good �
Don’t just have at it. Make a detailed decision as to what you want to implement (e.g.
the new color scheme) before you start. Give yourself a set amount of time (e.g. 1 hour)
and work only on that. Stay focussed and if you are not done by the specified time,
commit your changes and take a break. Rinse and repeat.
Remember, your first 10 points are free with 3 commits minimally in git. And keep your
repos local. Uploading anything course related to GitHub for example is a major
violation of the Academic Honesty Policy and can have severe repercussions.
As always your homework should be accompanied by a ReadMe file based on our