
I checked on Interface Builder, and the initial scene is set to view controller WelcomeViewController. However, when I run it on the iPad, the program crashes because it tries to load MainViewController as the initial scene.

It runs perfectly on the iPhone, loading WelcomeViewController as the initial scene. But you rotate it to landscape and then back to portrait, it comes back! Ok, It is because the delegate is too late in viewDidLoad, and the delegate method is not called.Īssignment 4 finished, I have not done extra credit section part, only rows.I recently copied everything in my iPhone storyboard over to an iPad storyboard and changed nothing.

Otherwise first time app launch in portrait orientation you can't find the dancing button in your detail view. The second strange is about the delegate assignment, we have do it in awakefromNib instead of viewDidLoad. I'm not very sure why setNeedsDisplay doesn't not work like this until now. Finally, I made it through a private method "updatePhoto", in which I put all the things like downloading, assigning threads. I found many people had this strange problem, but no one get the answer. Normally we do this in the setter of the property, in this case, "photo" for the PhotoViewController. But there are 2 strange problems you may face, at least they were on me.įirst, we all know previously we use to reload the image after we set the imageView's property, and this is what we want in this assignment. Making things working on iPad is not new, we have done in assignment 3, which you can find in my blog.

If someone have simple way to do this please let me know thanks. I also think my cache class is too complex with more than 35 lines of code. I store the cache's directory path as a property for convince sharing in all methods. In this way, I recognise and compare with photo NSdictionary that we are going to download.Ģ. We hold the array of NSStrings instead of an array of UIImages, because there would be a lot of strong pointers to images! As to the files' names, I choose their "id", i.e. They are all instance methods because I need two private properties to use inside of them.ġ. to write photo into cache no matter where we read it from because it will overwrite the exist one no duplex to worry. to read from cache if the photo is in cache.Ĥ. to check the current photo is in cache or not.ģ. to retrieve the photos info that are already cached.Ģ. We need create a subclass of NSObject to do 4 things:ġ. I have done multi-threading and iPad in previous one. I leave Unvisit button function and all the details to next part. It makes things very impressing simple! And all cache function applies to Vacation tab! I create photo as NSDictionary type from Photo type and send it to PhotoViewController in PhotoListTVC when clicked. I make TagTVC and ItineraryTVC sagued to same PhotoListTVC because they are only different on predicate code.Ĥ. The predicate setting is a little tricky you might interest.ģ. I spent another night when I figured out TagTableViewController which shows all photos having that particular tag.

The object at that url will not be overwritten! Understand this will make all the rest comparatively easier because it did stuck me several nights.Ģ. At last, I realised that when you need you can always init a new UIManagedDocument object with that url and open it. Create a helper class to initialise and open the vacation context, then call it via blocks, during which I always tried to find a class method to open a UIManagedDocument through a url where we save before, but failed. Fortunately, I have finished the toughest part, now.ġ. This assignment is much harder than what I thought.
