Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ReactiveCocoaで日本語入力
Search
Jiro Nagashima
January 15, 2015
Technology
0
1.9k
ReactiveCocoaで日本語入力
iOSのカスタムキーボードでReactiveCocoaを利用して日本語入力を試みた内容です。
Jiro Nagashima
January 15, 2015
Tweet
Share
More Decks by Jiro Nagashima
See All by Jiro Nagashima
グロースを加速するLooker活用 / Leveraging Looker to accelerate growth
hedjirog
3
2.7k
プロダクトの成長を支えるKPI / KPIs for growing your product
hedjirog
17
3.7k
UIViewPropertyAnimatorで実現するリッチなアニメーション表現
hedjirog
4
2.1k
ReactorKit at Wantedly
hedjirog
2
930
ReactorKitを利用した緩やかなアーキテクチャの移行
hedjirog
3
1.4k
限られたリソースで進める段階的なSwit移行
hedjirog
2
5.1k
エンジニア・デザイナーで取り組むグロースハック
hedjirog
6
2.3k
iOS 10 時代のアニメーション / Introduction to UIViewPropertyAnimator
hedjirog
3
3k
How we use fastlane at Wantedly
hedjirog
9
11k
Other Decks in Technology
See All in Technology
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
2
250
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
190
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
110
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
260
大幅アップデートされたRagas v0.2をキャッチアップ
os1ma
2
520
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
180
第3回Snowflake女子会_LT登壇資料(合成データ)_Taro_CCCMK
tarotaro0129
0
180
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
200
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
150
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
440
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
280
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
The Cult of Friendly URLs
andyhume
78
6.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Agile that works and the tools we love
rasmusluckow
328
21k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
96
Fireside Chat
paigeccino
34
3.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Producing Creativity
orderedlist
PRO
341
39k
Transcript
3FBDUJWF$PDPB Ͱ ຊޠೖྗ !IFEKJSPH
ͳ͕͠·͡Ζ͏ !IFEKJSPH 4BOTBOגࣜձࣾ&JHIU
Γ͍ͨ͜ͱ
3FBDUJWF$PDPB ϦΞΫςΟϒϓϩάϥϛϯά
ʓ4USFBN ʷ.77. ʷCJOEJOH ͢͜ͱ
ʲ༁ʳ͋ͳ͕ͨٻΊ͍ͯͨϦΞΫςΟϒϓϩάϥϛϯάೖ Θ͔Γ͍͢ʂʂ
ຊޠೖྗ
Ωʔೖྗ
I P O O ΞϧϑΝϕοτ
ม Τϯδϯ
΄ Μ ͻΒ͕ͳ
ຊޠೖྗ ͻΒ͕ͳม Ωʔೖྗ ΞϧϑΝϕοτ ͻΒ͕ͳ
ຊޠೖྗ ͻΒ͕ͳม Ωʔೖྗ ΞϧϑΝϕοτ ͻΒ͕ͳ 4USFBN 4USFBN 3FBDUJWF$PDPB
ͬͨ͜ͱ
IFEKJSPH3FBDUJWF,FZCPBSE
IFEKJSPH3FBDUJWF,FZCPBSE ˣˣˣGPSLˣˣˣ LJTIJLBXBLBUTVNJ +BQBOFTF,FZCPBSE,JU
Ωʔೖྗ RACSignal *signal = [self rac_signalForSelector:@selector(buttonDidTouchUp:)]; return [[[signal reduceEach:^(KeyboardButton *button){
return button; }] filter:^BOOL(KeyboardButton *button) { return button.keyIndex < KeyboardButtonIndexShift; }] map:^(KeyboardButton *button) { NSString *inputCharacter = [button titleForState:UIControlStateNormal]; return inputCharacter; }]; ΞϧϑΝϕοτͷ 4USFBN 4JHOBM ˞3"$$PNNBOEͰՄ I P O O
I P O O RACSignal *vowelSignal = [[inputSignal filter:^BOOL(NSString *inputCharacter)
{ return [@[@"A", @"I", @"U", @"E", @"O"] containsObject:inputCharacter]; }] map:^(id _) { NSMutableString *mutableBuffer; mutableBuffer = [NSMutableString stringWithString:self.buffer]; CFStringTransform((CFMutableStringRef)mutableBuffer, NULL, kCFStringTransformLatinHiragana, FALSE); return [NSString stringWithString:mutableBuffer]; }]; Ի ͷ 4USFBN ม Τϯδϯ ͻΒ͕ͳ ͷ 4USFBN ΄ ΞϧϑΝϕοτ ͷ 4USFBN
࿈ଓจࣈ ͷ 4USFBN ͻΒ͕ͳ ͷ 4USFBN ΞϧϑΝϕοτ ͷ
4USFBN I P O O RACSignal *consecutiveSignal = [[[bufferedInputConnection.signal combinePreviousWithStart:@"" reduce:^(NSString *previous, NSString *current) { return [NSSet setWithArray:@[previous, current]]; }] filter:^BOOL(NSSet *characters) { return [characters count] == 1; }] map:^(NSSet *characters) { NSString *consecutiveCharacter = [characters anyObject]; return ([consecutiveCharacter isEqualToString:@"N"]) ? @"Μ" : @"ͬ"; }]; ม Τϯδϯ Μ
ʷ ͻΒ͕ͳ ͷ 4USFBN ͻΒ͕ͳ ͷ 4USFBN RACSubject *transformedCharacter
= [RACSubject subject]; [[[RACSignal merge:@[vowelSignal, consecutiveSignal]] doNext:^(id _) { self.buffer = [[NSMutableString alloc] init]; }] subscribe:transformedCharacter]; ม Τϯδϯ ΄ ม Τϯδϯ Μ ΄ Μ
ͳͥͬͨͷ͔
049༻ͷ4,,"RVB4,, ϝϯςφϯεऴྃʂʂ
DPEFpSTUBRVBTLL ༗ࢤʹΑΔमਖ਼൛͋Δ͕ʜ
ʘઈࢍ։ൃதʂʂʗ 4USFBN4,, Ծ