I'm trying to change the text shadow position of my UISegmentedControl. To do this, the documentation says I need to pass in an NSValue which wraps a UIOffset struct.
UITextAttributeTextShadowOffset
Key to the offset used for the text shadow in a text attributes dictionary.
The corresponding value is an instance of NSValue wrapping a UIOffset struct.
Available in iOS 5.0 and later.
Declared in UIStringDrawing.h.
The problem is NSValue has no such wrapper method for a UIOffset struct - just search the documentation. I saw a lot of sample code use this nonexistent function.
[NSValue valueWithUIOffset:UIOffsetMake(0, 1)]
It crashes when I try to run it. I don't understand how so many sample code can run it.