[memo][XIB]Custom UIView from Xib file in Xcode 5 for Reusable Components — Part 1

Jameskrauser Lee
3 min readMar 8, 2018

--

Drag one view to StoryBoard and copy it
add / User Interface / View
change Size to Freeform
modify xib size
add lable and switch to xib and setting class = SliderView
Drag View to SliderView.h
Drag Label and Switch from xib to SliderView.h
Setting each view’s Class = SliderView
add loadNibNamed in SliderView.m

Demo:
success show up two xib component.
but i don’t know why had one grey square.

Source Code
https://github.com/jameskrauser/XIB_Component1

Part 2
https://www.youtube.com/watch?v=5ibVlOx2o7I&t=378s

remove didReceiveMemoryWarning

Source Code
https://github.com/jameskrauser/XIB_Component2

--

--

Jameskrauser Lee
Jameskrauser Lee

Written by Jameskrauser Lee

For the last few years. i was involved mostly in the development of Automatic Fare collection system for the Chennai Metro. Familiar with C++ and iOS.

No responses yet