41883c8216
1. Bring in ‘showsPlaceholder’ 2. Rendering Event indicators by image instead of CALayer 3. Using FSCalendarAnimator to control animations 4. Update Examples 5. Code clean
58 lines
2.0 KiB
Objective-C
58 lines
2.0 KiB
Objective-C
//
|
|
// FSTableViewController.m
|
|
// FSCalendar
|
|
//
|
|
// Created by DingWenchao on 6/25/15.
|
|
// Copyright (c) 2015 =. All rights reserved.
|
|
//
|
|
|
|
#import "FSTableViewController.h"
|
|
#import "LoadViewExampleViewController.h"
|
|
#import "ViewDidLoadExampleViewController.h"
|
|
#import "MultipleSelectionViewController.h"
|
|
#import "FullScreenExampleViewController.h"
|
|
#import "DelegateAppearanceViewController.h"
|
|
#import "CalendarIdentifierViewController.h"
|
|
#import "HidePlaceholderViewController.h"
|
|
|
|
@implementation FSTableViewController
|
|
|
|
- (void)viewDidLoad
|
|
{
|
|
[super viewDidLoad];
|
|
|
|
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStyleBordered target:nil action:nil];
|
|
|
|
self.viewControllers = @[
|
|
[HidePlaceholderViewController class],
|
|
[CalendarIdentifierViewController class],
|
|
[DelegateAppearanceViewController class],
|
|
[FullScreenExampleViewController class],
|
|
[MultipleSelectionViewController class],
|
|
[NSObject class],
|
|
[NSObject class],
|
|
[LoadViewExampleViewController class],
|
|
[ViewDidLoadExampleViewController class] // Deprecated
|
|
];
|
|
|
|
self.tableView.rowHeight = [[UIDevice currentDevice].model hasSuffix:@"iPad"] ? 60.0 : 44.0;
|
|
}
|
|
|
|
- (void)viewWillAppear:(BOOL)animated
|
|
{
|
|
[super viewWillAppear:animated];
|
|
if (self.tableView.indexPathForSelectedRow) {
|
|
[self.tableView deselectRowAtIndexPath:self.tableView.indexPathForSelectedRow animated:animated];
|
|
}
|
|
}
|
|
|
|
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
|
{
|
|
id viewControllerClass = self.viewControllers[indexPath.row];
|
|
if ([viewControllerClass isSubclassOfClass:[UIViewController class]]) {
|
|
[self.navigationController pushViewController:[[viewControllerClass alloc] init] animated:YES];
|
|
}
|
|
}
|
|
|
|
@end
|