Closed ninoguba closed 7 years ago
@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.
It would be nice to be able to use the StoryBoard.
I would also like this.
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?
@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.
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!
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.