# Anyone know how to use CTRubyAnnotationRef?

**URL:** <https://forums.kodeco.com/t/anyone-know-how-to-use-ctrubyannotationref/13530>\
**Category:** iOS\
**Created:** [April 17, 2016, 8:22pm UTC](https://forums.kodeco.com/t/anyone-know-how-to-use-ctrubyannotationref/13530 "2016-04-17T20:22:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rufy](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rufy/32/111867_2.png) [@rufy](https://forums.kodeco.com/u/rufy)\
**Post date:** [April 17, 2016, 8:22pm UTC](https://forums.kodeco.com/t/anyone-know-how-to-use-ctrubyannotationref/13530/1 "2016-04-17T20:22:29Z")

</div>

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](http://nshipster.com/ios8/). 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.
