Steps to reproduce:
Create class like
MyIcon
below;Drag a UIView onto storyboard (background is white);
Set UIView's custom class to
MyIcon
; andBackground color disappears.
MyIcon.swift:
import UIKit
@IBDesignable class MyIcon: UIView {}
See storyboard screenshot below for evidence of loss of white background color: