Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Beginning iPhone Development with Swift 3: Ch. 14, Documents and iCloud

Th App does not work as expected:

After CMD
Run the Simulator shows the device (iPhone) and the Detail scene is shown,
however the View is empty, i.e. no 8 by 8 squares are shown.

When I click Back, the Master scene is shown, with the list of documents.

I can select colors.

I can create a new document, however the detailView is not drawn. I can see the
files in Finder.

In
MasterViewController prepareForSegue is never called.
In
DetailViewController the View is not configured since detailItem is always nil.
In
TinyPixDocument the func load(fromContents ..) is never called.
In TinyPixView the func
init is never called,
  while required Init? and commonInit() ARE called.
  func draw(_ rect: CGRect) is called, however no rectangles are drawn, since
document is always nil:
I use Mac
OS Sierra 10.12.3, Xcode 8.2, Swift 3.0.2, iOS 10.2

Can anyone provide
a hint what is wrong here, since the app is built successfully, no issues are
indicated.



Comments

  • The whole problem appears to come from the fact that property "document" in class TinyPixView does not get set up. It remains at nil.

    Where/when does property "document" get set up?

Sign In or Register to comment.