Apple CareKit not able to navigate to OCKCareCardViewController

90 Views Asked by At

I am trying to implement basic functionality in Apple CareKit Framework. But i am not able to navigate to OCKCareCardViewController.

Please find my code here on Github https://github.com/sandesh271991/CareKitDemo

Please guide me where I am doing wrong

1

There are 1 best solutions below

0
Akshay Yadav On

You are doing self.navigationController?.pushViewController(careCardViewController, animated: true), but your ViewController does not have a navigationController. Add a navigation controller in your storyboard, make it initial view controller, and make your ViewController as its rootViewController, and your code should work fine (See the image attached).Navigation Controller to ViewController