DrummerB/BFNavigationBarDrawer
关于
UIToolbar 的子类,可轻松显示在 UINavigationBar 下方,类似于 Music 应用中的播放列表视图。
设计与媒体实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文BFNavigationBarDrawer
| With automatic scroll view adjustment | Without scroll view adjustment |
|---|---|
![]() |
![]() |
Summary
BFNavigationBarDrawer is a UIToolbar subclass that can easily be displayed below a UINavigationBar, similarly to the playlist view in the Music app. You can also assign a scroll view (or table view) to the drawer. The drawer will take care of moving the scroll view's content down and updating its contentInset property, when the drawer is displayed.
Instructions
Create a Podfile, if you don't have one already. Add the following line.
pod 'BFNavigationBarDrawer'
Run the following command.
pod install
Alternatively, you can just drop the BFNavigationBarDrawer.{h,m} files into your project.
Create a drawer instance and assign a scroll view that should be scrolled by the drawer:
drawer = [[BFNavigationBarDrawer alloc] init];
drawer.scrollView = self.tableView;
Add some UIBarButtonItems to it and when you want to display it, call:
[drawer showFromNavigationBar:self.navigationController.navigationBar animated:YES];
To hide it:
[drawer hideAnimated:YES];
Notes
I only tested with iOS 7. It doesn't make a lot of sense to use it with earlier iOS versions, as navigation bars used to be opaque and you could simply resize the scroll view to make room for an additional header bar.
License
New BSD License. For the full license text, see here.
探索相关项目
加载中…

