1
A
回答
2
由於缺乏一個更好的解決方案,我目前做的:
CGAffineTransform CGAffineTransformFromString(NSString *string)
{
string = [string stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"[ ]"]];
NSArray *components = [string componentsSeparatedByString:@","];
CGAffineTransform transform;
transform.a = [[components objectAtIndex:0] floatValue];
transform.b = [[components objectAtIndex:1] floatValue];
transform.c = [[components objectAtIndex:2] floatValue];
transform.d = [[components objectAtIndex:3] floatValue];
transform.tx = [[components objectAtIndex:4] floatValue];
transform.ty = [[components objectAtIndex:5] floatValue];
return transform;
}
相關問題
- 1. 將CGAffineTransform轉換爲NSString
- 2. CGAffineTransform中的UnsafePointer <CGAffineTransform>
- 3. CGAffineTransform rotation
- 4. UIView上的iOS CGAffineTransform
- 5. 查找CGAffineTransform
- 6. 限制CGAffineTransform Scale
- 7. AutoLayout CGAffineTransform iOS7 iOS8
- 8. CGAffineTransform更改view.bounds?
- 9. 從CATransform3D到CGAffineTransform
- 10. 瞭解CGAffineTransform旋轉
- 11. 瞭解CGAffineTransform交互
- 12. 如何比較CGAffinetransform?
- 13. CGAffineTransform旋轉90度
- 14. 旋轉CGPoints; CIVector CGAffineTransform?
- 15. iphone - 使CGAffineTransform永久
- 16. CGAffineTransform和NSLayoutConstraint衝突
- 17. UIDynamicAnimator用於CGAffineTransform的視圖
- 18. 的iOS CGAffineTransform古怪行爲
- 19. 獲取CGAffineTransform的旋轉
- 20. CGAffineTransform獲取UIView的中心
- 21. 怪異的行爲CGAffineTransform
- 22. 「CGAffineTransform」是無法轉換爲「ConstUnsafePointer <CGAffineTransform>」
- 23. CGAffineTransform縮放和旋轉
- 24. 當UIGestureRecognizerStateFailed時CGaffinetransform重置
- 25. 可伸縮UIImage和CGAffineTransform
- 26. CGAffineTransform MakeScale導致黑屏?
- 27. Swift 3 - CGAffineTransform不起作用
- 28. 防止CGAffineTransform逐漸應用
- 29. 將NSAffineTransform轉換爲CGAffineTransform
- 30. CGAffineTransform工作不正常