У меня есть простой подкласс UIButton, который реализует IBDesignable с помощью IBInspectable var:
@IBDesignable class Button: UIButton {
    @IBInspectable var borderColor: UIColor = UIColor.whiteColor() {
        didSet { layer.borderColor = borderColor.CGColor }
    }
}
Я не использую это в рамках структуры и, в соответствии с этим, работает в Interface Builder, но как только я добавлю этот подкласс к моему целевому объекту Tests, он прекратит рендеринг в реальном времени, и я получаю следующие ошибки:
Main.storyboard: error: IB Designables: Failed to update auto layout status: dlopen(TestTests.xctest, 1): Library not loaded: @rpath/XCTest.framework/XCTest
Referenced from: TestTests.xctest
Reason: image not found
Main.storyboard: error: IB Designables: Failed to render instance of Button: dlopen(TestTests.xctest, 1): Library not loaded: @rpath/XCTest.framework/XCTest
Referenced from: TestTests.xctest
Reason: image not found
Если я удаляю IBDesignable и IBInspectable vars, ошибки уходят - к сожалению, так же делает live рендеринг в Interface Builder.
Как я могу протестировать класс IBDesignable без этих ошибок?




