Gluten is a Micro library to unify XIB and its code.
We always try to generalize some views that would be used in different places throughout the app. And one approach that we usually do is to make XIB along with its code.
But as we know, the XIB and its code don’t automatically connected. And we tend do these things to make them connected:
- Instantiate the NIB.
- Add the loaded NIB as a subview.
- Setting frame or constraints needed.
Always doing those things for every view that we make, I think there’s a better way. What we have to do is calling one function inside our view’s code. Yes, just that! Follow the steps below to see how it goes.

Leave a Reply
You must be logged in to post a comment.