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.8k
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
MLOps の現場から
asei
7
650
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
2
110
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
130
Snykで始めるセキュリティ担当者とSREと開発者が楽になる脆弱性対応 / Getting started with Snyk Vulnerability Response
yamaguchitk333
2
190
ずっと昔に Star をつけたはずの思い出せない GitHub リポジトリを見つけたい!
rokuosan
0
150
ブラックフライデーで購入したPixel9で、Gemini Nanoを動かしてみた
marchin1989
1
540
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
860
5分でわかるDuckDB
chanyou0311
10
3.2k
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
2
760
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
サーバーなしでWordPress運用、できますよ。
sogaoh
PRO
0
100
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Thoughts on Productivity
jonyablonski
67
4.4k
Making Projects Easy
brettharned
116
5.9k
Automating Front-end Workflow
addyosmani
1366
200k
Site-Speed That Sticks
csswizardry
2
190
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
520
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Building Applications with DynamoDB
mza
91
6.1k
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,, Ծ