在使用xib创建 UIViewController和UITableViewCell的界面的时候,通常都会由程序自动载入xib界面,不需多做处理.
但是在使用xib 创建普通的如UIView的界面的时候,如果用普通的init方法,是没有办法自动载入xib的,这个时候必须使用
<span style="font-size:18px;">Class *obj = [[NSBundle mainBundle] loadNibNamed: owner: options:][0];</span>
来载入xib文件.