Skip to content

pmairoldi/LSWeekView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LSWeekView

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

LSWeekView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "LSWeekView"

Author

Christoph Zelazowski, Lumen Spark LLC, Seattle, WA chrisze@lumenspark.com

License

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

About

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

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages

  • Objective-C 87.4%
  • Ruby 12.6%