ayoy / ThumbnailPickerView

iOS UI control displaying a set of thumbnails - resembling iPad's Photos.app toolbar thumbnails view

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using ThumbnailPickerView with Storyboards

lumierephoto opened this issue · comments

commented

I'm trying to integrate ThumbnailPickerView into my project using Storyboards.

So far, I've solved the build/compiler errors, but the photos aren't loading in the view.

I noticed that in this project the for the ThumbnailPickerView's view in the XIB the outlets (dataSource, delegate) and referencing outlet (thumbnailPickerView) are connected to "File's Owner".

From what I understand, this is a placeholder class of some sort, however, if I'm using Storyboards how should I connect these outlets? Connect to the Parent ViewController?

Yes, you can either set dataSource and delegate in your view controller's code e.g. like this (assuming the view controller is a delegate and data source, and it has a property called thumbnailPickerView):

self.thumbnailPickerView.dataSource = self;
self.thumbnailPickerView.delegate = self;

Or connect outlets in Storyboard to the parent view controller.

commented

Unfortunately, that did not work. I tried both solutions.

Referring to your ThumbnailPickerView project here on Github, what would "File's Owner" translate to?

Or rather, if this project was created with Storyboards would the Outlets connect to "ViewController", since it is the parent?

Also, would it matter that in my project that I have your ViewController with the ThumbnailPickerView NOT as the root view ? In my project, this screen segues from the root view.