2

I'm using "User Defined Runtime Attributes" for my custom classes in IB.

I catch the values in: -(void) setValue:(id)value forKey:(NSString *)key

How do I convert values for Size, Point and Rect?

NSLog(@"value %@", value)

for Size writes: "value NSSize: {10, 10}"

But isn't NSSize only a datatype for OSX?

Thanks!

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328
nashg
  • 23
  • 3

1 Answers1

3

This is actually a mistake in Apple's framework. The description is simply outputting NSSize instead of CGSize. You can use it like this [value CGSizeValue] etc. NSSize doesn't even exist on iOS so it is impossible that you are dealing with it.

You can verify this with one line -> NSLog(@"%@", [NSValue valueWithCGSize:CGSizeMake(10, 10)]);

borrrden
  • 33,256
  • 8
  • 74
  • 109