Skip to content

Commit 70f1b97

Browse files
committed
Merge branch 'release/3.8.1'
2 parents 8cc2e4f + cc80958 commit 70f1b97

19 files changed

+89
-56
lines changed

README.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,26 @@ WordPress for iOS
22

33
## Resources
44

5-
### Developer blog
5+
### Developer blog & Handbook
66

7-
http://dev.ios.wordpress.org/
7+
Blog: http://make.wordpress.org/mobile
8+
9+
Handbook: http://make.wordpress.org/mobile/handbook/
810

911
### Style guide
1012

1113
https://github.com/wordpress-mobile/WordPress-iOS/wiki/WordPress-for-iOS-Style-Guide
1214

1315
### To report an issue
1416

15-
http://ios.trac.wordpress.org/newticket
16-
17-
You'll need a WordPress.org account. If you don't have one you can
18-
register here:
19-
20-
http://wordpress.org/support/register.php
17+
https://github.com/wordpress-mobile/WordPress-iOS/issues
2118

2219
### Source Code
2320

24-
SVN: http://ios.svn.wordpress.org/
25-
26-
SVN browser: http://ios.trac.wordpress.org/browser
27-
28-
Github mirror: https://github.com/wordpress-mobile/WordPress-iOS/
21+
GitHub: https://github.com/wordpress-mobile/WordPress-iOS/
2922

3023
## Building
3124

3225
Starting with changeset 3633 version 3.2, WordPress for iOS uses Cocoapods (http://cocoapods.org/) to manage third party libraries. Trying to build the project by itself (WordPress.xcproj) after launching will result in an error, as the resources managed by cocoapods are not included. Instead, launch the workspace by either double clicking on WordPress.xcworkspace file, or launch Xcode and choose File > Open and browse to WordPress.xcworkspace.
3326

34-
27+
You will not be able to connect to WordPress.com hosted blogs when compiling WordPress for iOS yourself. See the following handbook page for more information: http://make.wordpress.org/mobile/handbook/general-guides/connecting-to-wordpress-com/

WordPress/Classes/EditPostViewController.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,9 @@ - (IBAction)showMediaOptions:(id)sender {
450450
[WPMobileStats flagProperty:StatsPropertyPostDetailClickedMediaOptions forEvent:[self formattedStatEventString:StatsEventPostDetailClosedEditor]];
451451
PostMediaViewController *vc = [[PostMediaViewController alloc] initWithPost:self.apost];
452452
vc.postDetailViewController = self;
453-
self.navigationItem.title = NSLocalizedString(@"Back", nil);
453+
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Back", @"") style:UIBarButtonItemStyleBordered target:nil action:nil];
454+
self.navigationItem.backBarButtonItem = backButton;
455+
454456
[self.navigationController pushViewController:vc animated:YES];
455457
}
456458

@@ -646,6 +648,7 @@ - (void)populateSelectionsControllerWithCategories {
646648
[[CPopoverManager instance] setCurrentPopoverController:popover];
647649

648650
} else {
651+
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Back", @"") style:UIBarButtonItemStyleBordered target:nil action:nil];
649652
self.editMode = EditPostViewControllerModeEditPost;
650653
[self.navigationController pushViewController:segmentedTableViewController animated:YES];
651654
}

WordPress/Classes/GeneralWalkthroughViewController.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ - (void)addPage1Controls
549549
if (_pageControl == nil) {
550550
// The page control adds a bunch of extra space for padding that messes with our calculations.
551551
_pageControl = [[UIPageControl alloc] init];
552+
[_pageControl addTarget:self action:@selector(pageNumberChanged:) forControlEvents:UIControlEventValueChanged];
552553
_pageControl.numberOfPages = 3;
553554
[_pageControl sizeToFit];
554555
[WPNUXUtility configurePageControlTintColors:_pageControl];
@@ -950,6 +951,15 @@ - (void)flagPageViewed:(NSUInteger)pageViewed
950951
}
951952
}
952953

954+
- (void)pageNumberChanged:(UIPageControl *)pageControl
955+
{
956+
NSInteger pageNumber = pageControl.currentPage;
957+
958+
[_scrollView setContentOffset:CGPointMake(_viewWidth * pageNumber, 0) animated:YES];
959+
960+
_currentPage = pageNumber;
961+
}
962+
953963
- (void)showCompletionWalkthrough
954964
{
955965
LoginCompletedWalkthroughViewController *loginCompletedViewController = [[LoginCompletedWalkthroughViewController alloc] init];

WordPress/Classes/NewNotificationsTableViewCell.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ + (CGFloat)rowHeightForNotification:(Note *)note andMaxWidth:(CGFloat)maxWidth
130130
CGRect gravatarImageFrame = [[self class] gravatarImageFrame];
131131
CGRect subjectFrame = [[self class] subjectFrameForNotification:note leftFrame:gravatarImageFrame andMaxWidth:maxWidth];
132132
CGRect detailFrame = [[self class] detailFrameForNotification:note leftFrame:gravatarImageFrame topFrame:subjectFrame andMaxWidth:maxWidth];
133-
134-
return CGRectGetMaxY(detailFrame) + NotificationCellStandardOffset;
133+
134+
CGFloat bottom = MAX(CGRectGetMaxY(gravatarImageFrame), CGRectGetMaxY(detailFrame));
135+
return bottom + NotificationCellStandardOffset;
135136
}
136137

137138
- (void)prepareForReuse {

WordPress/Classes/Note.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,6 @@ - (void)syncAttributes:(NSDictionary *)noteData {
204204
}
205205

206206
- (void)updateAttributes:(NSDictionary *)noteData {
207-
self.payload = [noteData JSONData];
208-
self.noteData = [self.payload mutableObjectFromJSONData];
209207
if ([noteData objectForKey:@"type"]) {
210208
self.type = [noteData objectForKey:@"type"];
211209
}

WordPress/Classes/PanelNavigationController.m

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ @interface PanelNavigationController () <UIGestureRecognizerDelegate>
3434
@property (nonatomic, strong) NSMutableArray *detailViewWidths;
3535
@property (nonatomic, strong) UIButton *detailTapper;
3636
@property (nonatomic, strong) UIPanGestureRecognizer *panner;
37+
@property (nonatomic, strong) UIScreenEdgePanGestureRecognizer *edgePanner;
3738
@property (nonatomic, strong) UIView *popPanelsView, *menuView;
3839
@property (nonatomic, strong) UIImageView *sidebarBorderView;
3940
@property (nonatomic, strong) UIButton *notificationButton, *menuButton;
@@ -112,17 +113,6 @@ @implementation PanelNavigationController {
112113
BOOL _pushing;
113114
}
114115

115-
@synthesize detailViewController = _detailViewController;
116-
@synthesize masterViewController = _masterViewController;
117-
@synthesize navigationController = _navigationController;
118-
@synthesize detailViewContainer = _detailViewContainer;
119-
@synthesize detailViewControllers = _detailViewControllers;
120-
@synthesize detailViews = _detailViews;
121-
@synthesize detailViewWidths = _detailViewWidths;
122-
@synthesize detailTapper = _detailTapper;
123-
@synthesize panner = _panner;
124-
@synthesize popPanelsView = _popPanelsView;
125-
@synthesize sidebarBorderView = _sidebarBorderView;
126116
@synthesize delegate;
127117

128118
CGFloat const PanelNavigationControllerStatusBarViewHeight = 20.0;
@@ -957,14 +947,14 @@ - (void)closeSidebarAnimated:(BOOL)animated {
957947
// posts editor, we won't have a blue bar sitting at the top.
958948
self.statusBarBackgroundView.backgroundColor = [UIColor clearColor];
959949
}];
960-
961950

962951
if(IS_IPHONE && !self.presentedViewController) {
963952
[SoundUtil playSwipeSound];
964953
}
965954
}
966955

967956
- (void)closeSidebarWithVelocity:(CGFloat)velocity {
957+
_panned = NO;
968958
[self enableDetailView];
969959
[self setStackOffset:(DETAIL_LEDGE_OFFSET - DETAIL_OFFSET) withVelocity:velocity];
970960

@@ -1038,6 +1028,7 @@ - (void)enableDetailView {
10381028
}
10391029

10401030
self.detailTapper = nil;
1031+
_panned = NO;
10411032

10421033
// Restore scroll to top behavior to detail view
10431034
[self setScrollsToTop:NO forView:self.masterView];
@@ -1091,13 +1082,27 @@ - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
10911082
}
10921083

10931084
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
1085+
// ARD - I'm not sure this is the right spot for the panned = NO reset
10941086
if (gestureRecognizer == self.panner || gestureRecognizer.view == self.detailTapper) {
10951087
_panOrigin = _stackOffset;
10961088
_panned = NO;
10971089
}
1090+
1091+
if (gestureRecognizer == self.edgePanner && [touch.view isDescendantOfView:self.detailViewController.view] == NO) {
1092+
return NO;
1093+
}
1094+
10981095
return YES;
10991096
}
11001097

1098+
- (void)edgePanned:(UIScreenEdgePanGestureRecognizer *)sender
1099+
{
1100+
if (sender.state == UIGestureRecognizerStateEnded) {
1101+
[self showSidebar];
1102+
_panned = YES;
1103+
}
1104+
}
1105+
11011106
- (void)panned:(UIPanGestureRecognizer *)sender {
11021107
/*
11031108
_stackOffset is how many pixels the views are dragged to the left from the initial (sidebar open) position
@@ -1238,13 +1243,28 @@ - (void)addPanner {
12381243
} else {
12391244
[self.view addGestureRecognizer:panner];
12401245
}
1246+
1247+
if (IS_IOS7) {
1248+
UIScreenEdgePanGestureRecognizer *edgePanner = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector(edgePanned:)];
1249+
edgePanner.edges = UIRectEdgeLeft;
1250+
edgePanner.cancelsTouchesInView = YES;
1251+
edgePanner.delegate = self;
1252+
self.edgePanner = edgePanner;
1253+
[self.view addGestureRecognizer:edgePanner];
1254+
}
12411255
}
12421256

12431257
- (void)removePanner {
12441258
if (self.panner) {
12451259
[self.panner.view removeGestureRecognizer:self.panner];
12461260
}
1261+
1262+
if (self.edgePanner) {
1263+
[self.edgePanner.view removeGestureRecognizer:self.panner];
1264+
}
1265+
12471266
self.panner = nil;
1267+
self.edgePanner = nil;
12481268
}
12491269

12501270
- (void)setFrameForViewController:(UIViewController *)viewController {
@@ -1598,6 +1618,8 @@ - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)ani
15981618
// Set the panelNavigation before any of the view methods are relayed for iOS4.
15991619
[viewController setPanelNavigationController:self];
16001620

1621+
_panned = NO;
1622+
16011623
if (self.navigationController) {
16021624
[self.navigationController pushViewController:viewController animated:animated];
16031625
} else {

WordPress/Classes/PostSettingsViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ - (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath
892892
case 1:
893893
[WPMobileStats trackEventForWPCom:[self formattedStatEventString:StatsEventPostDetailSettingsClickedRemoveFeaturedImage]];
894894
actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Remove this Featured Image?", @"Prompt when removing a featured image from a post") delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", "Cancel a prompt") destructiveButtonTitle:NSLocalizedString(@"Remove", @"Remove an image/posts/etc") otherButtonTitles:nil];
895-
[actionSheet showFromRect:cell.frame inView:self.view animated:YES];
895+
[actionSheet showFromRect:cell.frame inView:tableView animated:YES];
896896
break;
897897
}
898898
} else {

WordPress/Classes/ReaderPostDetailViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ - (void)viewWillAppear:(BOOL)animated {
175175
if (IS_IPAD)
176176
[self.panelNavigationController setToolbarHidden:NO forViewController:self animated:NO];
177177

178+
[self.post addObserver:self forKeyPath:@"isReblogged" options:NSKeyValueObservingOptionNew context:@"reblogging"];
179+
178180
[_headerView updateLayout];
179181
[self showStoredComment];
180182
}
@@ -190,8 +192,6 @@ - (void)viewDidAppear:(BOOL)animated {
190192
if (lastSynced == nil || ABS([lastSynced timeIntervalSinceNow]) > ReaderPostDetailViewControllerRefreshTimeout) {
191193
[self syncWithUserInteraction:NO];
192194
}
193-
194-
[self.post addObserver:self forKeyPath:@"isReblogged" options:NSKeyValueObservingOptionNew context:@"reblogging"];
195195
}
196196

197197

WordPress/Classes/ReaderPostsViewController.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@ - (void)handleTopicsButtonTapped:(id)sender {
257257
ReaderTopicsViewController *controller = [[ReaderTopicsViewController alloc] initWithStyle:UITableViewStyleGrouped];
258258
controller.delegate = self;
259259
if (IS_IPAD) {
260+
if (_popover) {
261+
[_popover dismissPopoverAnimated:YES];
262+
_popover = nil;
263+
return;
264+
}
265+
260266
_popover = [[UIPopoverController alloc] initWithContentViewController:controller];
261267
_popover.popoverBackgroundViewClass = [WPPopoverBackgroundView class];
262268

WordPress/Classes/WPWebViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ - (void)viewDidLoad
134134
toolbar.barTintColor = [WPStyleGuide littleEddieGrey];
135135
toolbar.tintColor = [UIColor whiteColor];
136136
} else {
137-
UIColor *color = [UIColor UIColorFromHex:0x464646];
137+
UIColor *color = [UIColor whiteColor];
138138
backButton.tintColor = color;
139139
forwardButton.tintColor = color;
140140
refreshButton.tintColor = color;

0 commit comments

Comments
 (0)