asw

ASWeekSelectorView

iOS calendar-inspired simple mini week view to swipe through weeks and tap on days

Showing:

Popularity

Downloads/wk

0

GitHub Stars

58

Maintenance

Last Commit

4mos ago

Contributors

2

Package

Dependencies

0

License

FreeBSD

Categories

Readme

ASWeekSelectorView

CocoaPod badge w/ Platform Travis build status CocoaPod badge w/ Version Carthage compatible

A mini week view to select a day. You can swipe through weeks and tap on a day to select them, somewhat similar to the iOS calendar app (since iOS 7).

It's using the methodology described in Apple's excellent WWDC 2011 session 104 "Advanced ScrollView Techniques".

Week selector

Setup

1) Add to your project.

Using Cocoapods:

pod 'ASWeekSelectorView', '~> 1.0'

Using Carthage:

github "nighthawk/ASWeekSelectorView"

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;
}

Example

See the included example project for a very basic implementation.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial