Currently I am programmatically creating a CCScrollView
with this code:
func didLoadFromCCB() {
self.userInteractionEnabled = true
let contentNode = scrolling //scrolling is just a CCNode
let scrollView = CCScrollView(contentNode: contentNode)
scrollView.contentSizeType = CCSizeType(widthUnit: .Points, heightUnit: .Points)
scrollView.contentSize = CGSizeMake(200, 200)
let viewSize = CCDirector.sharedDirector().viewSize()
scrollView.position = CGPoint(x: viewSize.width / 2.0, y: viewSize.height / 2.0)
addChild(scrollView)
}
I get this error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '[PROPERTY] contentNode - kCCBPropTypeCCBFile - Failed to find ccb file: ".ccbi", node class name: "CCScrollView", name: "", in ccb file: "MainScene.ccbi"'
The same thing happens if I add the scroll view in sprite builder. Does anyone know how to fix this? It appears as though I am missing the scroll view source file. Any help is greatly appreciated! Thanks!