Actually, the opposite is probably a better approach. We designed C4 so that it reflects Swift and the iOS frameworks, i.e. the language and programming paradigms are very similar. For doing creative work, interfaces with animations, media, etc, we've actually made it easier in many ways than doing this with straight UIKit.
So, while you're learning C4 you'll actually be learning Swift and how to work with iOS frameworks. Then, when you're ready you can make the jump.
As for that tapAction
, and other docs, we will be improving our documentation for sure. For now, the various tutorials will make reference to certain techniques in C4. For example, from the creative apps tutorial:
let t = addTapGestureRecognizer { locations, center, state in
if self.lineWidth > 0.0 {
self.lineWidth = 0.0
} else {
self.lineWidth = 1.0
}
}
And, from the cosmos tutorial Chapter 19: Menu Selector:
canvas.addLongPressGestureRecognizer { locations, center, state in
switch state {
case .Changed:
self.update(center)
case .Cancelled, .Ended, .Failed:
self.currentSelection = -1
self.highlight.hidden == true
default:
_ = ""
}
}
Both of these show how to add gesture actions to an object:
object.addTapGestureRecognizer { locations, center, state in
//... do stuff.
}
And, any visual object can have a gesture attached to it.