Add Custom view to your project
-
Create a class that conforms to
ChoicelyExternalViewControllerFactoryprotocol: -
Declare all your custom views usage inside it’s
createViewController()method:This is how you can create custom navigation URLs:Custom navigation URLs like"choicely://special/your_custom_url"can be set and configured in Choicely Studio.
- Set the custom url, click “Add Navigation” and save the changes by clicking “Update” button in the top right corner.
-
Here is the example of fully configured
ChoicelyExternalViewControllerFactory: -
Create an instance of
YourCustomViewControllerFactoryclass and just beforeChoicelySDK.initialize(...)assign it toChoicelySDK.settings.externalViewControllerFactory:To learn more about other ChoicelySDK settings explore them in XCode with(⌥)+click. -
That’s it! You’re ready to use your custom views.
You can mix Choicely content like
ArticlesandSurveyswith your own UI logic inside one custom view.
