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.6k
プロダクトの成長を支えるKPI / KPIs for growing your product
hedjirog
17
3.7k
UIViewPropertyAnimatorで実現するリッチなアニメーション表現
hedjirog
4
2.1k
ReactorKit at Wantedly
hedjirog
2
920
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
スクラムチームを立ち上げる〜チーム開発で得られたもの・得られなかったもの〜
ohnoeight
2
350
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
12k
【若手エンジニア応援LT会】ソフトウェアを学んできた私がインフラエンジニアを目指した理由
kazushi_ohata
0
150
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
120
スクラム成熟度セルフチェックツールを作って得た学びとその活用法
coincheck_recruit
1
140
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
170
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
180
Amazon Personalizeのレコメンドシステム構築、実際何するの?〜大体10分で具体的なイメージをつかむ〜
kniino
1
100
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
2
1.6k
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
Platform Engineering for Software Developers and Architects
syntasso
1
510
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Code Review Best Practice
trishagee
64
17k
Being A Developer After 40
akosma
86
590k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
GraphQLとの向き合い方2022年版
quramy
43
13k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
RailsConf 2023
tenderlove
29
900
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
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,, Ծ