Skip to content
0:00 / 0:00

#swift#xib#uiview

Create a CustomView in XIB

CodeWithSwiftly

50 subscribers • 1 video on Hallway

YouTube
  • Recommended by 1 person: 1 on Stack Overflow and its sister sites.
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Intermediate. Assumes working knowledge.

16K views8 years ago1 recommendation

Mobile developmentiOS and SwiftUI

A step-by-step tutorial on how to create a reusable custom UIView using a XIB file in iOS.

This video is a small tutorial on how to make a custom view in xib.

Why it's here

1 person recommends this

What people say. Recommended as a guide for creating reusable custom UIViews with XIBs and connecting IBOutlets.

Rahul Dasguptaon Stack Overflow • Recommends

On “Is it possible to create an @IBOutlet in a custom view?”

If you want to reuse a UIView then best to create an xib of the view and a custom class of the UIView. Then change the file owner in xib class to your custom class. Then you can drag and drop IBOutlets of the components inside the view to custom class. In the storyboard you can use the custom view and change the name of the class of view to custom view. Now drag and drop the IBOutlets from the story board to UIView. You can see the tutorial video on how to do , I have made for you. link to this video