# Remind iOS: Present All the Things!

DevFeed: [Remind iOS: Present All the Things!](<https://devfeed.tech/articles/remind-ios-present-all-the-things-31930.md>)

Original publisher: [Read original article](<http://engineering.remind.com/ios-presentation/>)

Author: Remind

Published: 2019-05-28T00:00:00Z

Content type: article

Language: en

Sources: [Remind](<https://devfeed.tech/sources/remind.md>)

Topics: [User interface design](<https://devfeed.tech/topics/ui-design.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [MVVM](<https://devfeed.tech/topics/mvvm.md>), [mvc](<https://devfeed.tech/topics/mvc.md>), [Design system](<https://devfeed.tech/topics/design-system.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>)

Tags: [ios](<https://devfeed.tech/tags/ios.md>), [layout](<https://devfeed.tech/tags/layout.md>), [mvvm](<https://devfeed.tech/tags/mvvm.md>), [subclass](<https://devfeed.tech/tags/subclass.md>)

## AI overview

The excerpt describes Remind's MVVM-oriented iOS practices for building reusable UI components. The team uses programmatic layout with SnapKit, citing easier code review and parallel work as reasons for leaving xibs, while acknowledging teams may choose differently. It recommends encapsulating related controls in UIView subclasses, keeping internal primitives private, and exposing data through a present(...) method or limited properties. View models adapt domain objects into presentation data, while closures with action enums report user actions. Reusable design components get their own files; feature-specific views stay private alongside their view controller. The author also recommends separating UI management from navigation sequence so view controllers handle fewer responsibilities.

## Source excerpt

For the past couple years we've been implementing new features with an MVVM-driven approach. Over that time, we've settled into a couple of good (I think) patterns for implementing UIView subclasses, composing them in various view hierarchies, and handling the interactions between them. Ultimately, the goal of any iOS application is to get data presented onto the screen, so I thought I'd share what's been working well for us in that department. Layout In Code It's a debate where every team eventually has to pick a side: Do we use storyboards and xibs, or do we write all of our layout in code? To make a long story short, our team started with Interface Builder, but we abandoned xibs a few years ago and have gone to fully programmatic layout code using SnapKit as our DSL of choice. Every team's needs will be different, but we think it's important that we can effectively code-review each other's layout implementations and potentially have multiple people working on the same screen, neither of which are really practical with xibs. I'll leave it at that -- you do you. Use UIView Subclasses Liberally Nothing clutters the actual logic of a UIViewController like big blocks of view construction code. Whenever you have a logical grouping UI primitives (UILabel, UIImageView, UIButton, etc), make a UIView subclass that encapsulates all of the relative layout inside that view container. This allows you to build the view hierarchy for your view controller in simpler, larger, more logical chunks of UI. One of the more complex UI layouts we have in our application is the settings screen for a class the user owns. Let's look at the layout and focus on the CLASS SETTINGS section, which contains two items, each consisting of two labels and a switch. On our first iteration, our view controller maintained property accessors for each of those primitives: class ClassSettingsViewController: UIViewController { ... private let isPublicTitleLabel = UILabel() private let isPublicMessageLabel =