Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
155c5b5
Refactored Reader's new design for reuse elsewhere
mikejohnstn Nov 20, 2013
05b42a6
Start of major refactoring of Reader's detail view
mikejohnstn Nov 22, 2013
db69aca
Refactor button actions as delegate methods
mikejohnstn Nov 22, 2013
c78a31a
Make detail view use new delegate methods
mikejohnstn Nov 22, 2013
e11dbd5
Move reader tap actions to delegate methods
mikejohnstn Nov 23, 2013
12be3ea
Remove ReaderDetailView now that it has been generalized away
mikejohnstn Nov 23, 2013
8da2bfb
Fix some videos not opening properly inline
mikejohnstn Nov 24, 2013
dbd74fb
Merge branch 'develop' into feature/602-reader-detail
mikejohnstn Nov 25, 2013
7c865ff
Replaced deprecated sizeWithFont
mikejohnstn Nov 25, 2013
ded137e
Code format cleanup
mikejohnstn Nov 25, 2013
e126c6a
Removed iOS6-specific code
mikejohnstn Nov 25, 2013
211d61c
Don't allow selection of content 'row'
mikejohnstn Nov 25, 2013
551b546
Made Reader detail display at narrower width on iPad
mikejohnstn Nov 26, 2013
c591d70
Format fixes for iPad
mikejohnstn Nov 26, 2013
14aa7ea
Remove KVO for isReblogged
mikejohnstn Nov 26, 2013
32be7a5
Make image caching resilient to rounding and only use widths
mikejohnstn Nov 26, 2013
fda4592
Various sizing fixes, disable scroll detection for now
mikejohnstn Nov 26, 2013
85f986f
Override fetched results controller to prevent table updates from con…
mikejohnstn Nov 26, 2013
ca8955b
Remove iOS6-specific code
mikejohnstn Nov 26, 2013
ad87de1
Change iPad tables to have a fixed and wider width
mikejohnstn Nov 26, 2013
85f2cf6
Make Reader comments narrower on iPad as well
mikejohnstn Nov 26, 2013
94b9f9f
Fix comment form not displaying correctly
mikejohnstn Nov 26, 2013
9a61327
Changed detail view background colors
mikejohnstn Nov 26, 2013
dbc7195
Fix cell contentView not being sized
mikejohnstn Nov 26, 2013
f42bcbf
Changed Reader comment design
tomwitkin Nov 26, 2013
0814a8a
Remove logic for loading visible images
mikejohnstn Nov 27, 2013
eb14d25
Code for preloading images (disabled for now)
mikejohnstn Nov 27, 2013
4d22195
Remove remaining presentAsModal global antipatterns (fixes #620)
mikejohnstn Nov 29, 2013
e0869c0
Remove unimplemented failure handler (fixes #645)
mikejohnstn Nov 29, 2013
80650e1
Remove another reference to removed handler
mikejohnstn Nov 30, 2013
34bec83
Merge branch 'develop' into feature/602-reader-detail
mikejohnstn Dec 2, 2013
5db9f40
Reenable and improve trick for preloading images
mikejohnstn Dec 4, 2013
73304f6
Don't display the placeholder icon for images
mikejohnstn Dec 4, 2013
5b2eafc
Set state of follow button on configuration (fixes #704)
mikejohnstn Dec 4, 2013
e70e689
Fix reblog form not displaying correctly
mikejohnstn Dec 4, 2013
f6dc6c6
Comment cleanup
mikejohnstn Dec 4, 2013
ef99356
Constrain the width of the follow button
mikejohnstn Dec 4, 2013
829a467
Swap out topic change delegate for NSNotification for easier reuse
mikejohnstn Dec 4, 2013
ee078e4
Handle tapping a tag in the Reader detail view
mikejohnstn Dec 4, 2013
e2711e7
Comment cleanup
mikejohnstn Dec 4, 2013
73ed940
Remove unused isScrollingFast logic
mikejohnstn Dec 4, 2013
4ada971
Don't use self to set properties in init
mikejohnstn Dec 6, 2013
390e2e9
Move code from viewDidUnload to dealloc
mikejohnstn Dec 6, 2013
507ddd9
Merge branch 'develop' into feature/602-reader-detail
mikejohnstn Dec 6, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion WordPress/Classes/ReaderCommentTableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
#import <UIKit/UIKit.h>
#import "ReaderTableViewCell.h"
#import "ReaderComment.h"
#import "WPTableViewCell.h"

@interface ReaderCommentTableViewCell : UITableViewCell
@interface ReaderCommentTableViewCell : WPTableViewCell
@property (nonatomic, strong) UIImageView *cellImageView;

+ (NSAttributedString *)convertHTMLToAttributedString:(NSString *)html withOptions:(NSDictionary *)options;
Expand Down
41 changes: 13 additions & 28 deletions WordPress/Classes/ReaderCommentTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#import "NSDate+StringFormatting.h"

#define RCTVCVerticalPadding 5.0f
#define RCTVCIndentationWidth 10.0f
#define RCTVCIndentationWidth 15.0f
#define RCTVCAuthorLabelHeight 20.0f

@interface ReaderCommentTableViewCell()<DTAttributedTextContentViewDelegate>
Expand Down Expand Up @@ -96,17 +96,15 @@ + (NSAttributedString *)convertHTMLToAttributedString:(NSString *)html withOptio
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {

UIColor *color = DTColorCreateWithHexString(@"EFEFEF");
CGFloat width = self.frame.size.width;
self.backgroundColor = color;
self.backgroundColor = [WPStyleGuide itsEverywhereGrey];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay!


[self.cellImageView setFrame:CGRectMake(10.0f, 10.0f, 20.0f, 20.0f)];
self.cellImageView.autoresizingMask = UIViewAutoresizingFlexibleRightMargin;

self.textContentView = [[DTAttributedTextContentView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.frame.size.width, 44.0f)];
_textContentView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
_textContentView.backgroundColor = color;
_textContentView.backgroundColor = [UIColor clearColor];
_textContentView.edgeInsets = UIEdgeInsetsMake(0.0f, 10.0f, 0.0f, 10.0f);
_textContentView.delegate = self;
_textContentView.shouldDrawImages = NO;
Expand All @@ -118,40 +116,26 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
_dateLabel.textColor = [WPStyleGuide littleEddieGrey];
_dateLabel.textAlignment = NSTextAlignmentRight;
_dateLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin;
_dateLabel.backgroundColor = color;
_dateLabel.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:_dateLabel];

self.authorLabel = [[UILabel alloc] initWithFrame:CGRectMake(40.0f, 10.0f, (_dateLabel.frame.origin.x - 50.0f), 20.0f)];
self.authorLabel = [[UILabel alloc] initWithFrame:CGRectMake(10.0f, 10.0f, (_dateLabel.frame.origin.x - 50.0f), 20.0f)];
[_authorLabel setFont:[WPStyleGuide subtitleFont]];
_authorLabel.textColor = [WPStyleGuide littleEddieGrey];
_authorLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;
_authorLabel.backgroundColor = color;
_authorLabel.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:_authorLabel];

UIImageView *separatorImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cell-separator"]];
separatorImageView.frame = CGRectMake(0.0f, 0.0f, width, 2.0f);
UIImageView *separatorImageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.indentationWidth, 0.0f, width - self.indentationWidth, 1.0f)];
separatorImageView.backgroundColor = [UIColor colorWithHexString:@"e5e5e5"];
separatorImageView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[self.contentView addSubview:separatorImageView];

self.textContentView.frame = CGRectMake(0.0f, _authorLabel.frame.size.height + 10.0f, width, 44.0f);

UIView *view = [[UIView alloc] initWithFrame:self.bounds];
UIView *view = [[UIView alloc] initWithFrame:self.frame];
view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
view.backgroundColor = DTColorCreateWithHexString(@"A9E2F3");

CGRect rect = CGRectMake(0, 0, 1, 1);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [color CGColor]);
CGContextFillRect(context, rect);
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

UIView *colorView = [[UIImageView alloc] initWithImage:img];
colorView.frame = CGRectMake(0.0f, 0.0f, width, 2.0f);
colorView.autoresizingMask = UIViewAutoresizingFlexibleWidth;

[view addSubview:colorView];
view.backgroundColor = DTColorCreateWithHexString(@"e5e5e5");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally not a big fan of using the DTCoreText methods ... naming the colors is my favorite. No need to change, my two cents.


[self setSelectedBackgroundView:view];
}
Expand All @@ -165,8 +149,9 @@ - (void)layoutSubviews {

// We have to manually update the indentation of the content view? wtf.
CGRect frame = self.contentView.frame;
frame.origin.x += (self.indentationWidth * self.indentationLevel);
frame.size.width -= frame.origin.x;
CGFloat indent = self.indentationWidth * self.indentationLevel;
frame.origin.x += indent;
frame.size.width -= indent;
self.contentView.frame = frame;

[self.cellImageView setFrame:CGRectMake(10.0f, 10.0f, 20.0f, 20.0f)];
Expand Down
23 changes: 0 additions & 23 deletions WordPress/Classes/ReaderPostDetailView.h

This file was deleted.

Loading