<commit_before>---
layout: page
title:  "Using Ready-made View Controllers"
categories: ios-sdk
---

View Controllers are a staple in iOS development, and the iOS SDK provide view controllers for modules that Stellar Loyalty exposes.

Before using any view controller, it should be noted first that for these view controllers to work, the user must have logged in already. To learn more about the login view, go to our [previous article detailing about the login process].

## Anatomy of a Stellar Loyalty View Controller

![]({{site.baseurl}}/img/sdk/ios/view_controllers/view_controller_anatomy.png)<commit_msg>Rearranging sections to introduce SLViewController first<commit_after>---
layout: page
title:  "Using Ready-made View Controllers"
categories: ios-sdk
---

View Controllers are a staple in iOS development, and the iOS SDK provide view controllers for modules that Stellar Loyalty exposes.

Before using any view controller, it should be noted first that for these view controllers to work, the user must have logged in already. To learn more about the login view, go to our [previous article detailing about the login process].

## `SLViewController`

All view controllers exposed by the Stellar Loyalty iOS SDK are descendants of a super-class named `SLViewController`. 

## Anatomy of a Stellar Loyalty View Controller

The image beliow dissects a typical view controller's parts. As you can see, the view controller can be divided into two major components:

- Navigation Bar
- Content View

![]({{site.baseurl}}/img/sdk/ios/view_controllers/view_controller_anatomy.png)

### Navigation Bar

Having a navigation bar inside a Stellar Loyalty View Controller
{'fraction_non_alphanumeric': 0.06160287081339713, 'fraction_numerical': 0.0, 'mean_word_length': 4.829268292682927, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3852589', 'n_tokens_mistral': 461, 'n_tokens_neox': 417, 'n_words': 221}