52inc / Pulley

A library to imitate the iOS 10 Maps UI.
https://cocoapods.org/pods/Pulley
MIT License
2.02k stars 265 forks source link

How to push to PulleyViewController from other View Controllers when my main View Controller is in the Primary Content Container View #359

Closed DavinHrdy closed 5 years ago

DavinHrdy commented 5 years ago
Screen Shot 2019-09-14 at 3 10 16 PM

Hi, I'm relatively new with iOS programming. I need help trying to push to the storyboard containing the PulleyViewController from another View Controller. (preferably newbie level of explanation)

Usually the first initial storyboard is using the main View Controller, so I have no problem with that. First thing I've tried is to push the view controller of the Primary View (Product Scan Page View Controller) but I realized there is no drawer, so in this case I have to call the PulleyViewController right?

When I tried this code:

Screen Shot 2019-09-14 at 3 12 52 PM

I get an error 'Storyboard (<UIStoryboard: 0x280ce48c0>) doesn't contain a view controller with identifier 'PulleyViewController''. I've also tried identifier: PrimaryContentViewController. Could you guide me how to push to my main view controller in Primary Content Container View?

I have followed the instructions, connected the container view reference to primary and drawer content container view, etc. It is just a matter of showing the storyboard with my main View Controller using Pulley.

amyleecodes commented 5 years ago

You’re close. You don’t want to use the PulleyViewController class name as the identifier, however.

When you select PulleyViewController you can see in Interface Builder’s right-side column/menu that there’s a field named “identifier”. (I think it’s the left most tab, but I can’t remember off the top of my head). You need to give it an identifier to uniquely identify that view controller. You can then use that identifier to instantiate PulleyViewController from your storyboard.

DavinHrdy commented 5 years ago

Gah, dumb me x).

Thanks for the help, just input the storyboardID and everything just clicks into place. Really great library, so many details that I didn’t think about when I tried making the drawer manually.