Anyone know how to use CTRubyAnnotationRef?

with iOS 8 Apple has added this to write japanese word or sentences with phonetic guide, called furigana.

i’ve found some post in stackoverflow and this post of nshipster. it seem simple but how can I use it?

if I write this

@import CoreText;

NSString *kanji = @"猫";
NSString *hiragana = @"ねこ";

CFStringRef furigana[kCTRubyPositionCount] =
    {(__bridge CFStringRef)hiragana, NULL, NULL, NULL};

CTRubyAnnotationRef ruby =
    CTRubyAnnotationCreate(kCTRubyAlignmentAuto, kCTRubyOverhangAuto, 0.5, furigana);

don’t work.

some post put this code, or other like this, in a subclass of textview. i need to do it? if I want to put this code in a UILable subclass, can I do it?

if i’ve a sentence like ‘私は日本人でわありませんけれども、日本語を勉強していますよ。’ How can i use it to insert the furigana?

私(わたし)は日本人(にほんじん)ではありませんけれども、日本語(にほんご)を勉強(べんきょう)していますよ。in the bracket there is the furigana.