CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

LSWeekView 1.0.5

LSWeekView 1.0.5

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Christoph Zelazowski.




  • By
  • Christoph Zelazowski

iOS week view control, similar to the one used in the iOS 7 Calendar app (day view).

The control is used in production in our Lumen Trails app, with over million downloads to date.

Screenshot

Usage

Run the example project to see it in action, or here's the snippet you can add to your view controller's viewDidLoad method:

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.weekView = [[LSWeekView alloc] initWithFrame:CGRectZero style:LSWeekViewStyleDefault];
    self.weekView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
    self.weekView.calendar = [NSCalendar currentCalendar];
    self.weekView.selectedDate = [NSDate date];

    __weak typeof(self) weakSelf = self;
    self.weekView.didChangeSelectedDateBlock = ^(NSDate *selectedDate) 
    {
        [weakSelf doSomethingUseful];
    };

    [self.view addSubview:self.weekView];
}

Requirements

iOS 7, ARC

Installation

Author

Christoph Zelazowski, Lumen Spark LLC, Seattle, WA [email protected]

License

LSWeekView is available under the MIT license. See the LICENSE file for more info.