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
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
9
1k
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
310
強いチームと開発生産性
onk
PRO
35
11k
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.2k
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
390
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
160
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
96
The Cult of Friendly URLs
andyhume
78
6k
Speed Design
sergeychernyshev
25
620
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
How GitHub (no longer) Works
holman
310
140k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Building an army of robots
kneath
302
43k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Embracing the Ebb and Flow
colly
84
4.5k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
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,, Ծ