Encoding CGPoint struct with NSCoder

后端 未结 3 958
别跟我提以往
别跟我提以往 2021-02-07 10:19

How do you encode and decode a CGPoint struct using NSCoder?

3条回答
  •  长情又很酷
    2021-02-07 10:47

    Just an update for iOS developers. You can do the following in Cocoa Touch (but not in Cocoa):

    [coder encodeCGPoint:myPoint forKey:@"myPoint"];
    

提交回复
热议问题