Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you initialize OCKCareCardViewController using StoryBoard? #68

Closed
ninoguba opened this issue Jun 14, 2016 · 6 comments
Closed

Can you initialize OCKCareCardViewController using StoryBoard? #68

ninoguba opened this issue Jun 14, 2016 · 6 comments

Comments

@ninoguba
Copy link
Contributor

Let's say I'm using the StoryBoard to design my app with multiple tabs in a TabViewController and one of these tabs is the OCKCareCardViewController. So far from the documentation and sample app, this can only be instantiated and added to the TabViewController programmatically.

@umerkhan-apple
Copy link
Contributor

@ninoguba In order to do so, the Care Card would have to be IB_INSPECTABLE. If this is highly-requested, then let's try to go ahead and do that.

@scdi
Copy link

scdi commented Jun 22, 2016

It would be nice to be able to use the StoryBoard.

@sashalondon
Copy link

I would also like this.

@ncarroll-mdsol
Copy link

Any update on this? Is there a way to hack around this in the time being?

Is there a good reason for these ViewControllers to not be compatible with Storyboards / Segues?

@tktsubota
Copy link
Contributor

tktsubota commented Oct 24, 2016

@ncarroll-mdsol I opened a PR a while back addressing this (#109). You can use the storyboard branch on my fork to try it out. See the PR for how to use it.

@ninoguba
Copy link
Contributor Author

I figured out a way clean way to separate the CareCard/SymptomTracker/Insight controllers on its own and have them somewhat represented in the Storyboard. The trick is subclassing a UINavigationController for each of the CareKit views you want to use then set the nav's viewcontrollers to contain just the corresponding CareKit view. Then in your Storyboard just add your nav controllers and define segues between them.

To address the singularity of the OCKCarePlanStore, just follow how it was done with OCKSample where a singleton CarePlanStoreManager class is used to share the same store between the different views.

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants