-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop'
- Loading branch information
Showing
8 changed files
with
320 additions
and
259 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 was deleted.
Oops, something went wrong.
105 changes: 0 additions & 105 deletions
105
WordPress-iOS-Shared/Core/WPTableViewSectionFooterView.m
This file was deleted.
Oops, something went wrong.
72 changes: 72 additions & 0 deletions
72
WordPress-iOS-Shared/Core/WPTableViewSectionHeaderFooterView.h
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,72 @@ | ||
#import <UIKit/UIKit.h> | ||
|
||
|
||
|
||
/** | ||
* @enum WPTableViewSectionStyle | ||
* @brief The WPTableViewSectionHeaderFooterView helper class has two default styles: Header and Footer. | ||
* By means of this simple enum, we'll be able to initialize the HeaderFooterView with the | ||
* standard styles that should be applied when using this tool as a Header, or a Footer. | ||
*/ | ||
|
||
typedef NS_ENUM(NSInteger, WPTableViewSectionStyle) | ||
{ | ||
WPTableViewSectionStyleHeader, | ||
WPTableViewSectionStyleFooter | ||
}; | ||
|
||
|
||
|
||
/** | ||
* @class WPTableViewSectionHeaderFooterView | ||
* @brief This class is meant to be used as TableView Section Footer, and provides a custom style that | ||
* should be used app-wide. | ||
*/ | ||
|
||
@interface WPTableViewSectionHeaderFooterView : UITableViewHeaderFooterView | ||
|
||
@property (nonatomic, assign, readonly) WPTableViewSectionStyle style; | ||
@property (nonatomic, strong) NSString *title; | ||
@property (nonatomic, strong) UIColor *titleColor; | ||
@property (nonatomic, strong) UIFont *titleFont; | ||
@property (nonatomic, assign) NSTextAlignment titleAlignment; | ||
@property (nonatomic, assign) UIEdgeInsets titleInsets; | ||
@property (nonatomic, assign) BOOL uppercase; | ||
|
||
- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier style:(WPTableViewSectionStyle)style; | ||
|
||
|
||
/** | ||
* @brief Calculates the Height required to display a View with the default Header Styles. | ||
* | ||
* @param headerText The text to be rendered. | ||
* @param width The container's width. | ||
* @returns Required Height | ||
*/ | ||
|
||
+ (CGFloat)heightForHeader:(NSString *)headerText width:(CGFloat)width; | ||
|
||
|
||
/** | ||
* @brief Calculates the Height required to display a View with the default Footer Styles. | ||
* | ||
* @param headerText The text to be rendered. | ||
* @param width The container's width. | ||
* @returns Required Height | ||
*/ | ||
|
||
+ (CGFloat)heightForFooter:(NSString *)footerText width:(CGFloat)width; | ||
|
||
|
||
/** | ||
* @brief Calculates the Height required to display a View with a custom Font and Title Insets. | ||
* | ||
* @param text The text to be rendered. | ||
* @param width The container's width. | ||
* @param font The font that should be used. | ||
* @returns Required Height | ||
*/ | ||
|
||
+ (CGFloat)heightForText:(NSString *)text width:(CGFloat)width titleInsets:(UIEdgeInsets)titleInsets font:(UIFont *)font; | ||
|
||
@end |
Oops, something went wrong.