Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jleandroperez committed Jul 30, 2015
2 parents 7d15c4e + b0239fc commit ba29f31
Show file tree
Hide file tree
Showing 8 changed files with 320 additions and 259 deletions.
2 changes: 1 addition & 1 deletion WordPress-iOS-Shared.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "WordPress-iOS-Shared"
s.version = "0.4.1"
s.version = "0.4.2"
s.summary = "Shared components used in building the WordPress iOS apps and other library components."

s.description = <<-DESC
Expand Down
18 changes: 6 additions & 12 deletions WordPress-iOS-Shared.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
931A1023192A9DFC00D3CC11 /* WPStyleGuide.m in Sources */ = {isa = PBXBuildFile; fileRef = 931A1022192A9DFC00D3CC11 /* WPStyleGuide.m */; };
931A1026192A9E0B00D3CC11 /* WPNUXUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 931A1025192A9E0B00D3CC11 /* WPNUXUtility.m */; };
931A1029192A9E2400D3CC11 /* WPTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 931A1028192A9E2400D3CC11 /* WPTableViewCell.m */; };
931A102E192A9E3200D3CC11 /* WPTableViewSectionFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 931A102B192A9E3200D3CC11 /* WPTableViewSectionFooterView.m */; };
931A102F192A9E3200D3CC11 /* WPTableViewSectionHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 931A102D192A9E3200D3CC11 /* WPTableViewSectionHeaderView.m */; };
931A102E192A9E3200D3CC11 /* WPTableViewSectionHeaderFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 931A102B192A9E3200D3CC11 /* WPTableViewSectionHeaderFooterView.m */; };
931A1035192AA03600D3CC11 /* UIColor+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 931A1034192AA03600D3CC11 /* UIColor+Helpers.m */; };
931A1038192AA34300D3CC11 /* WPImageSourceTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 931A1037192AA34300D3CC11 /* WPImageSourceTest.m */; };
931A103B192AA35B00D3CC11 /* AsyncTestHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 931A103A192AA35B00D3CC11 /* AsyncTestHelper.m */; };
Expand Down Expand Up @@ -93,10 +92,8 @@
931A1025192A9E0B00D3CC11 /* WPNUXUtility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WPNUXUtility.m; path = Core/WPNUXUtility.m; sourceTree = "<group>"; };
931A1027192A9E2400D3CC11 /* WPTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WPTableViewCell.h; path = Core/WPTableViewCell.h; sourceTree = "<group>"; };
931A1028192A9E2400D3CC11 /* WPTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WPTableViewCell.m; path = Core/WPTableViewCell.m; sourceTree = "<group>"; };
931A102A192A9E3200D3CC11 /* WPTableViewSectionFooterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WPTableViewSectionFooterView.h; path = Core/WPTableViewSectionFooterView.h; sourceTree = "<group>"; };
931A102B192A9E3200D3CC11 /* WPTableViewSectionFooterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WPTableViewSectionFooterView.m; path = Core/WPTableViewSectionFooterView.m; sourceTree = "<group>"; };
931A102C192A9E3200D3CC11 /* WPTableViewSectionHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WPTableViewSectionHeaderView.h; path = Core/WPTableViewSectionHeaderView.h; sourceTree = "<group>"; };
931A102D192A9E3200D3CC11 /* WPTableViewSectionHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WPTableViewSectionHeaderView.m; path = Core/WPTableViewSectionHeaderView.m; sourceTree = "<group>"; };
931A102A192A9E3200D3CC11 /* WPTableViewSectionHeaderFooterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WPTableViewSectionHeaderFooterView.h; path = Core/WPTableViewSectionHeaderFooterView.h; sourceTree = "<group>"; };
931A102B192A9E3200D3CC11 /* WPTableViewSectionHeaderFooterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WPTableViewSectionHeaderFooterView.m; path = Core/WPTableViewSectionHeaderFooterView.m; sourceTree = "<group>"; };
931A1030192A9F3500D3CC11 /* WPTextFieldTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WPTextFieldTableViewCell.h; path = Core/WPTextFieldTableViewCell.h; sourceTree = "<group>"; };
931A1033192AA03600D3CC11 /* UIColor+Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIColor+Helpers.h"; path = "Core/UIColor+Helpers.h"; sourceTree = "<group>"; };
931A1034192AA03600D3CC11 /* UIColor+Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIColor+Helpers.m"; path = "Core/UIColor+Helpers.m"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -243,10 +240,8 @@
931A1022192A9DFC00D3CC11 /* WPStyleGuide.m */,
931A1027192A9E2400D3CC11 /* WPTableViewCell.h */,
931A1028192A9E2400D3CC11 /* WPTableViewCell.m */,
931A102A192A9E3200D3CC11 /* WPTableViewSectionFooterView.h */,
931A102B192A9E3200D3CC11 /* WPTableViewSectionFooterView.m */,
931A102C192A9E3200D3CC11 /* WPTableViewSectionHeaderView.h */,
931A102D192A9E3200D3CC11 /* WPTableViewSectionHeaderView.m */,
931A102A192A9E3200D3CC11 /* WPTableViewSectionHeaderFooterView.h */,
931A102B192A9E3200D3CC11 /* WPTableViewSectionHeaderFooterView.m */,
931A1030192A9F3500D3CC11 /* WPTextFieldTableViewCell.h */,
FF8DDCE01B5E91050098826F /* WPTextFieldTableViewCell.m */,
);
Expand Down Expand Up @@ -443,10 +438,9 @@
9309B52D192BEECC00B69F69 /* WordPressShared.m in Sources */,
931A1016192A9D5200D3CC11 /* NSString+Util.m in Sources */,
931A1023192A9DFC00D3CC11 /* WPStyleGuide.m in Sources */,
931A102F192A9E3200D3CC11 /* WPTableViewSectionHeaderView.m in Sources */,
598E770E1A8E3D1A0020DC05 /* WPDeviceIdentification.m in Sources */,
7462F3401961FAAB00CC8EED /* WPFontManager.m in Sources */,
931A102E192A9E3200D3CC11 /* WPTableViewSectionFooterView.m in Sources */,
931A102E192A9E3200D3CC11 /* WPTableViewSectionHeaderFooterView.m in Sources */,
744DA846194F3A76002CD6E9 /* UIImage+Util.m in Sources */,
931A1020192A9DD500D3CC11 /* WPNoResultsView.m in Sources */,
931A1026192A9E0B00D3CC11 /* WPNUXUtility.m in Sources */,
Expand Down
22 changes: 0 additions & 22 deletions WordPress-iOS-Shared/Core/WPTableViewSectionFooterView.h

This file was deleted.

105 changes: 0 additions & 105 deletions WordPress-iOS-Shared/Core/WPTableViewSectionFooterView.m

This file was deleted.

72 changes: 72 additions & 0 deletions WordPress-iOS-Shared/Core/WPTableViewSectionHeaderFooterView.h
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
Loading

0 comments on commit ba29f31

Please sign in to comment.