Xcode 7.3 can't create xib with for UIView / UITableViewCell together
Very traditional way and existing with any XCode version.
- Right click on left panel
- Select new file
- Select iOS
- Select User Interface
- Select Empty then next
- Give file name.
That will create empty xib, now drag and drop UITableViewCell and give class name as you have given in .h and .m file or swift file name.
Swift class with UITableViewCell
import UIKit
class CustomCell: UITableViewCell {
@IBOutlet weak var lblName : UILabel!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
}
Yeah, this is a surprising issue.
First create a nib (e.g. ProfileHeaderView.xib) file from File -> New file.
Then create a .swift (e.g. ProfileHeaderView.swift) file and subclass it from UIView.
Last (but not the least of course), go to Identity Inspector of your .xib file and change the name of class to the name of the created .swift file (e.g. ProfileHeaderView.swift).
Hope that helps.