ios - Select part of GLKViewController -
i'm try implement this in project. have troubles it. plan use uipangesturerecognizer change size of rectangle. understand, should use uiview , custom drawrect method?
add action uipangesturerecognizer
, use translation
:
func wasdragged(gesture: uipangesturerecognizer) { let translation = gesture.translationinview(self.view) // resizing here, e.g. customview.frame.size.width = currentframe.width + translation.x customview.frame.size.height = currentframe.height + translation.y if gesture.state == .ended { currentframe = customview.frame } }
using method, add cgrect
variable store currentframe
.
Comments
Post a Comment