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.2k
ReactorKit at Wantedly
hedjirog
2
940
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
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
180
AWSサービスアップデート 2024/12 Part3
nrinetcom
PRO
0
140
生成AI × 旅行 LLMを活用した旅行プラン生成・チャットボット
kominet_ava
0
150
🌏丸い地球を効率的に平たくする 〜🗺️地図の幾何学とWeb地図技術〜
syotasasaki593876
0
140
今年一年で頑張ること / What I will do my best this year
pauli
1
220
[IBM TechXchange Dojo]Watson Discoveryとwatsonx.aiでRAGを実現!事例のご紹介+座学②
siyuanzh09
0
110
アジャイルチームが変化し続けるための組織文化とマネジメント・アプローチ / Agile management that enables ever-changing teams
kakehashi
3
3.3k
re:Invent2024 KeynoteのAmazon Q Developer考察
yusukeshimizu
1
130
iPadOS18でフローティングタブバーを解除してみた
sansantech
PRO
1
120
信頼されるためにやったこと、 やらなかったこと。/What we did to be trusted, What we did not do.
bitkey
PRO
0
2.1k
AWSマルチアカウント統制環境のすゝめ / 20250115 Mitsutoshi Matsuo
shift_evolve
0
100
テストを書かないためのテスト/ Tests for not writing tests
sinsoku
1
170
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
74
9.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
How to Ace a Technical Interview
jacobian
276
23k
RailsConf 2023
tenderlove
29
970
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,, Ծ