Skip to content

Instantly share code, notes, and snippets.

@chrene
Created January 10, 2015 00:35
Show Gist options
  • Save chrene/0fbeb4ec9d4f244d43ce to your computer and use it in GitHub Desktop.
Save chrene/0fbeb4ec9d4f244d43ce to your computer and use it in GitHub Desktop.
func initialize() {
self.layer.actions = [
"onOrderOut": NSNull(),
"sublayers": NSNull(),
"contents": NSNull(),
"bounds": NSNull()
]
}
func changed() {
CATransaction.begin()
CATransaction.setDisableActions(true)
self.textLayer.string = "a"
self.textLayer.frame = self.layer.bounds
CATransaction.commit()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment