-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add additional functionality to RDVCalendarDayCell, remove RDVCalenda…
…rHeaderView.
- Loading branch information
1 parent
8c5d2d3
commit b95fdf8
Showing
18 changed files
with
497 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// RDVExampleViewController.h | ||
// RDVCalendarView | ||
// | ||
// Created by Robert Dimitrov on 11/1/13. | ||
// Copyright (c) 2013 Robert Dimitrov. All rights reserved. | ||
// | ||
|
||
#import "RDVCalendarViewController.h" | ||
|
||
@interface RDVExampleViewController : RDVCalendarViewController | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// RDVExampleViewController.m | ||
// RDVCalendarView | ||
// | ||
// Copyright (c) 2013 Robert Dimitrov | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
|
||
#import "RDVExampleViewController.h" | ||
|
||
@interface RDVExampleViewController () | ||
|
||
@end | ||
|
||
@implementation RDVExampleViewController | ||
|
||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | ||
{ | ||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | ||
if (self) { | ||
self.title = @"Calendar"; | ||
} | ||
return self; | ||
} | ||
|
||
- (void)viewDidLoad { | ||
[super viewDidLoad]; | ||
|
||
[[self.navigationController navigationBar] setTranslucent:NO]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,93 @@ | ||
// RDVCalendarDayCell.h | ||
// RDVCalendarView | ||
// | ||
// RDVCalendarDayCell.h | ||
// RDVCalendarView | ||
// Copyright (c) 2013 Robert Dimitrov | ||
// | ||
// Created by Robert Dimitrov on 8/16/13. | ||
// Copyright (c) 2013 Robert Dimitrov. All rights reserved. | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
typedef NS_ENUM(NSInteger, RDVCalendarDayCellSelectionStyle) { | ||
RDVCalendarDayCellSelectionStyleNone, | ||
RDVCalendarDayCellSelectionStyleNormal, | ||
RDVCalendarDayCellSelectionStyleDefault, | ||
}; | ||
|
||
@interface RDVCalendarDayCell : UIView | ||
|
||
/** | ||
* A string used to identify a day cell that is reusable. (read-only) | ||
*/ | ||
@property(nonatomic, readonly, copy) NSString *reuseIdentifier; | ||
|
||
@property (nonatomic, readonly) UILabel *titleLabel; | ||
@property (nonatomic) UIView *contentView; | ||
@property (nonatomic) UIView *backgroundView; | ||
@property (nonatomic) UIView *selectedBackgroundView; | ||
/** | ||
* Returns the label used for the main textual content of the day cell. (read-only) | ||
*/ | ||
@property (nonatomic, readonly) UILabel *textLabel; | ||
|
||
/** | ||
* Returns the content view of the day cell object. (read-only) | ||
*/ | ||
@property (nonatomic, readonly) UIView *contentView; | ||
|
||
/** | ||
* The view used as the background of the day cell. | ||
*/ | ||
@property (nonatomic, strong) UIView *backgroundView; | ||
|
||
/** | ||
* The view used as the background of the day cell when it is selected. | ||
*/ | ||
@property (nonatomic, strong) UIView *selectedBackgroundView; | ||
|
||
/** | ||
* The style of selection for a cell. | ||
*/ | ||
@property(nonatomic) RDVCalendarDayCellSelectionStyle selectionStyle; | ||
|
||
/** | ||
* A Boolean value that indicates whether the cell is selected. | ||
*/ | ||
@property(nonatomic, getter = isSelected) BOOL selected; | ||
|
||
- (id)initWithStyle:(RDVCalendarDayCellSelectionStyle)style reuseIdentifier:(NSString *)reuseIdentifier; | ||
/** | ||
* A Boolean value that indicates whether the cell is highlighted. | ||
*/ | ||
@property(nonatomic, getter = isHighlighted) BOOL highlighted; | ||
|
||
/** | ||
* Initializes a day cell with a reuse identifier and returns it to the caller. | ||
*/ | ||
- (id)initWithReuseIdentifier:(NSString *)reuseIdentifier; | ||
|
||
/** | ||
* Sets the selected state of the cell, optionally animating the transition between states. | ||
*/ | ||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated; | ||
- (void)setSelected:(BOOL)selected; | ||
|
||
/** | ||
* Sets the highlighted state of the cell, optionally animating the transition between states. | ||
*/ | ||
- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated; | ||
|
||
/** | ||
* Prepares a reusable day cell for reuse by the calendar view. | ||
*/ | ||
- (void)prepareForReuse; | ||
|
||
@end |
Oops, something went wrong.