It is common to want to create a custom view that you can reuse, but also have a visual representation of it as well. There are two common ways to do this: the first way we will demonstrate now, and the other we will do later in this book. You can create a UIView that comes with a XIB (pronounced zib or nib). XIBs were the common way to create elements before storyboards, and are still effective today. Let's create one now:
- Right-click on the Misc folder and select New Group and call it No Data.
- Then, right-click on the No Data folder and create a new file.
- On the Choose a template for your new file screen, select iOS at the top. Then, select Cocoa Touch Class. Then, hit Next.
- In the options screen that appears, add the ...