ThumbnailPickerView icon indicating copy to clipboard operation
ThumbnailPickerView copied to clipboard

Using ThumbnailPickerView with Storyboards

Open lumierephoto opened this issue 12 years ago • 2 comments

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?

lumierephoto avatar Dec 04 '13 11:12 lumierephoto

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.

ayoy avatar Dec 04 '13 11:12 ayoy

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.

lumierephoto avatar Dec 04 '13 17:12 lumierephoto