Move from UIKit ViewController to a Kitchen.serve view
mikehuebner opened this issue · comments
Hello!
I am really interested to use this library as this makes much more sense to me than using the storyboard editor coming with Xcode.
That being said, I have an established project currently and I'm trying to integrate this into the mix.
Here is what I've done so far.
I map the movies to a structure using the Object Mapper piece (still needs cleanup)
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
let movie: Movie = Mapper<Movie>().map(self.movies[indexPath.row].rawString())!
let product = MovieProductRecipe(movie: movie)
print(product)
self.view.hidden = true
Kitchen.serve(recipe: product)
}
The collection view is a delegate coming from the storyboard which is referenced via drag and drop methods.
Next piece I want to do is serve that to the screen. Which it works! But I'm pretty sure according to tvOS' focus engine it is just not focusing on the element being display. As if this doesn't exist in the navigator.
Do I need to put something within my recipe to get this to work?
So would I need to rewrite my entire project using this library and depend on library that heavily? Or is there a way to pull focus into the mix. Thanks for the help and amazing library, its awesome what you can do with this.
Hi!
Thanks for trying out our library.😊
Sorry, but I didn't get your point. What is the problem?
Also could you create and share a entire sample project, so we can reproduce your problem? It can be either some other repo or you can modify SampleRecipe target and put into a PR.😉
Hey sorry for a late reply here! Working nights 😅
And I was trying to not have to rewrite a bunch of code to get this to work properly, then I realized that this doesn't override the current view controller. I can look into this if you would like, but if you have a Storyboard entry point it does seem to override the current view. It still shows, but it is as if the navigator didn't realize that something happened and UI did not update. I ended up branching and rewriting everything around the library which worried me a bit, I didn't want to rely on the library for everything but it is seem how it works, am I wrong on this? If I am, then I have a recreation that you can check out either that or there is something I'm not understanding.
@mikehuebner
Hi, are you still having this issue?
If you are, could you show me the recreation you mentioned? That would help me understanding what's going on.
@mikehuebner
Closing for now.
Please feel free to reopen this issue when you come back.