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
UINavigationBarの隅々までタップしたい
Search
Yosuke Ishikawa
November 13, 2013
Technology
2
11k
UINavigationBarの隅々までタップしたい
2013/11/13 potatotips
https://github.com/potatotips/potatotips/wiki/potatotips-1
Yosuke Ishikawa
November 13, 2013
Tweet
Share
More Decks by Yosuke Ishikawa
See All by Yosuke Ishikawa
Achieving Testability in Presentation Layer
ishkawa
4
3.6k
Introducing Wire: Dependency Injection by Code Generator
ishkawa
12
1.2k
Declarative UICollectionView
ishkawa
28
7.8k
Nuxt.jsが掲げる"Universal Vue.js Applications"とは何者か
ishkawa
10
2.7k
Static Dependency Injection by Code Generation
ishkawa
15
6.2k
実践クライアントサイドSwift
ishkawa
24
4.1k
JSON-RPC on APIKit
ishkawa
5
52k
RxSwiftは開発をどう変えたか?
ishkawa
12
3.7k
Swift + JSON-RPC
ishkawa
0
49k
Other Decks in Technology
See All in Technology
デジタルアイデンティティ人材育成推進ワーキンググループ 翻訳サブワーキンググループ 活動報告 / 20250114-OIDF-J-EduWG-TranslationSWG
oidfj
0
140
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
1
5k
MasterMemory v3 最速確認会
yucchiy
0
310
Visual StudioとかIDE関連小ネタ話
kosmosebi
1
290
Oracle Exadata Database Service(Dedicated Infrastructure):サービス概要のご紹介
oracle4engineer
PRO
0
12k
Fearsome File Formats
ange
0
550
機械学習を「社会実装」するということ 2025年版 / Social Implementation of Machine Learning 2025 Version
moepy_stats
3
160
UI State設計とテスト方針
rmakiyama
4
940
最近のSfM手法まとめ - COLMAP / GLOMAPを中心に -
kwchrk
8
1.8k
ネットワーク可視化の世界
likr
7
5.7k
スケールし続ける事業とサービスを支える組織とアーキテクチャの生き残り戦略 / The survival strategy for Money Forward’s engineering.
moneyforward
0
240
Unlearn Product Development - Unleashed Edition
lemiorhan
PRO
2
170
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Practical Orchestrator
shlominoach
186
10k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
How to Ace a Technical Interview
jacobian
276
23k
Gamification - CAS2011
davidbonilla
80
5.1k
Building an army of robots
kneath
302
44k
How to train your dragon (web standard)
notwaldorf
88
5.8k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Transcript
UINavigationBarͷ ۱ʑ·Ͱλοϓ͍ͨ͠ @_ishkawa
None
GHFeed
ຊ
Custom View λοϓ͍ͨ͠ͱ͜Ζ
͔ͯ͠͠ɿ ✗ Tips ✓ όουϊϋ
ΞΠσΟΞ ✓ UINavigationBarͷhitTest:withEvent:Λվ
hitTest:withEvent: leftBarButtonItem.customView
hitTest:withEvent: navigationBar
͜ͷͱ͖
for (UIView *subview in barButtonItem.customView.subviews) { UIView *customView = barButtonItem.customView;
CGRect convertedRect = [self convertRect:subview.frame fromView:customView]; ! if (CGRectContainsPoint(convertedRect, point)) { CGPoint convertedPoint = [self convertPoint:point toView:subview]; return [subview hitTest:convertedPoint withEvent:event]; } } ʢcustomView.subviews͔Βhit͢ΔͷΛ୳͢ʣ
ͬͯΔͱ
ίίʹϘλϯ͕͋ͬͯԠͰ͖Δʂ
ҰԠϥΠϒϥϦʹ͠·ͨ͠
ISInteractiveEdgesNavigationBar https://github.com/ishkawa/ISInteractiveEdgesNavigationBar
͍ํ Class navigationBarClass = [ISInteractiveEdgesNavigationBar class]; Class toolbarClass = [UIToolbar
class]; ! UINavigationController *navigationController = [[UINavigationController alloc] initWithNavigationBarClass:navigationBarClass toolbarClass:toolbarClass];
pod ‘ISInteractiveEdgesNavigationBar‘, ‘~> 0.0.2’