项目介绍:
ASWeekSelectorView
迷你型的一周七天日历展示,选择某一天。您可以通过滑动或者按钮点击某一天来选择它们,有点类似于iOS的7日历应用程序。
Setup
[Objective-C] 查看源文件 复制代码
1) Add to your Podfile: pod 'ASWeekSelectorView', '~> 0.4.0' 2) Add an instance of ASWeekSelectorView to your view hierarchy, configure it, provide a delegate and implement the delegate smethod. (Note that you won't need to use ASDaySelectionView and ASSingleWeekView yourself - they are internal helper class.) 3) When using Auto Layout, adjust the frame in viewWillLayoutSubviews: override func viewWillLayoutSubviews() { super.viewWillLayoutSubviews() weekSelector.frame.size.width = self.view.frame.width } - (void)viewWillLayoutSubviews { [super viewWillLayoutSubviews]; CGRect frame = self.weekSelector.frame; frame.size.width = CGRectGetWidth(self.view.frame); self.weekSelector.frame = frame; }
DEMO直接下载: