iphone - CGPoints and UIViews -
is possible place cgpoint inside of uiview subview when rotate uiview, cgpoint rotates it.
a cgpoint logical construct, not graphical. said, following produce point rotated around (called point). may not apply directly, should give direction. key cgaffinetransform.
cgaffinetransform translatetransform = cgaffinetransformmaketransation(point.x, point.y); cgaffinetransform rotatetransform = cgaffinetransformmakerotation(angle); cgaffinetransform customtransform = cgaffinetransformconcat(cgaffinetransformconcat( cgaffinetransforminvert(translatetransform), rotatetransform), translatetransform); newpoint = cgpointapplyaffinetransform(initialpoint, customtransform);
Comments
Post a Comment