Skip to content

Commit

Permalink
Merge branch 'release/3.8.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
koke committed Sep 20, 2013
2 parents 8cc2e4f + cc80958 commit 70f1b97
Show file tree
Hide file tree
Showing 19 changed files with 89 additions and 56 deletions.
21 changes: 7 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,26 @@ WordPress for iOS

## Resources

### Developer blog
### Developer blog & Handbook

http://dev.ios.wordpress.org/
Blog: http://make.wordpress.org/mobile

Handbook: http://make.wordpress.org/mobile/handbook/

### Style guide

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

### To report an issue

http://ios.trac.wordpress.org/newticket

You'll need a WordPress.org account. If you don't have one you can
register here:

http://wordpress.org/support/register.php
https://github.com/wordpress-mobile/WordPress-iOS/issues

### Source Code

SVN: http://ios.svn.wordpress.org/

SVN browser: http://ios.trac.wordpress.org/browser

Github mirror: https://github.com/wordpress-mobile/WordPress-iOS/
GitHub: https://github.com/wordpress-mobile/WordPress-iOS/

## Building

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.


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/
5 changes: 4 additions & 1 deletion WordPress/Classes/EditPostViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,9 @@ - (IBAction)showMediaOptions:(id)sender {
[WPMobileStats flagProperty:StatsPropertyPostDetailClickedMediaOptions forEvent:[self formattedStatEventString:StatsEventPostDetailClosedEditor]];
PostMediaViewController *vc = [[PostMediaViewController alloc] initWithPost:self.apost];
vc.postDetailViewController = self;
self.navigationItem.title = NSLocalizedString(@"Back", nil);
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Back", @"") style:UIBarButtonItemStyleBordered target:nil action:nil];
self.navigationItem.backBarButtonItem = backButton;

[self.navigationController pushViewController:vc animated:YES];
}

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

} else {
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Back", @"") style:UIBarButtonItemStyleBordered target:nil action:nil];
self.editMode = EditPostViewControllerModeEditPost;
[self.navigationController pushViewController:segmentedTableViewController animated:YES];
}
Expand Down
10 changes: 10 additions & 0 deletions WordPress/Classes/GeneralWalkthroughViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ - (void)addPage1Controls
if (_pageControl == nil) {
// The page control adds a bunch of extra space for padding that messes with our calculations.
_pageControl = [[UIPageControl alloc] init];
[_pageControl addTarget:self action:@selector(pageNumberChanged:) forControlEvents:UIControlEventValueChanged];
_pageControl.numberOfPages = 3;
[_pageControl sizeToFit];
[WPNUXUtility configurePageControlTintColors:_pageControl];
Expand Down Expand Up @@ -950,6 +951,15 @@ - (void)flagPageViewed:(NSUInteger)pageViewed
}
}

- (void)pageNumberChanged:(UIPageControl *)pageControl
{
NSInteger pageNumber = pageControl.currentPage;

[_scrollView setContentOffset:CGPointMake(_viewWidth * pageNumber, 0) animated:YES];

_currentPage = pageNumber;
}

- (void)showCompletionWalkthrough
{
LoginCompletedWalkthroughViewController *loginCompletedViewController = [[LoginCompletedWalkthroughViewController alloc] init];
Expand Down
5 changes: 3 additions & 2 deletions WordPress/Classes/NewNotificationsTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ + (CGFloat)rowHeightForNotification:(Note *)note andMaxWidth:(CGFloat)maxWidth
CGRect gravatarImageFrame = [[self class] gravatarImageFrame];
CGRect subjectFrame = [[self class] subjectFrameForNotification:note leftFrame:gravatarImageFrame andMaxWidth:maxWidth];
CGRect detailFrame = [[self class] detailFrameForNotification:note leftFrame:gravatarImageFrame topFrame:subjectFrame andMaxWidth:maxWidth];

return CGRectGetMaxY(detailFrame) + NotificationCellStandardOffset;

CGFloat bottom = MAX(CGRectGetMaxY(gravatarImageFrame), CGRectGetMaxY(detailFrame));
return bottom + NotificationCellStandardOffset;
}

- (void)prepareForReuse {
Expand Down
2 changes: 0 additions & 2 deletions WordPress/Classes/Note.m
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ - (void)syncAttributes:(NSDictionary *)noteData {
}

- (void)updateAttributes:(NSDictionary *)noteData {
self.payload = [noteData JSONData];
self.noteData = [self.payload mutableObjectFromJSONData];
if ([noteData objectForKey:@"type"]) {
self.type = [noteData objectForKey:@"type"];
}
Expand Down
46 changes: 34 additions & 12 deletions WordPress/Classes/PanelNavigationController.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ @interface PanelNavigationController () <UIGestureRecognizerDelegate>
@property (nonatomic, strong) NSMutableArray *detailViewWidths;
@property (nonatomic, strong) UIButton *detailTapper;
@property (nonatomic, strong) UIPanGestureRecognizer *panner;
@property (nonatomic, strong) UIScreenEdgePanGestureRecognizer *edgePanner;
@property (nonatomic, strong) UIView *popPanelsView, *menuView;
@property (nonatomic, strong) UIImageView *sidebarBorderView;
@property (nonatomic, strong) UIButton *notificationButton, *menuButton;
Expand Down Expand Up @@ -112,17 +113,6 @@ @implementation PanelNavigationController {
BOOL _pushing;
}

@synthesize detailViewController = _detailViewController;
@synthesize masterViewController = _masterViewController;
@synthesize navigationController = _navigationController;
@synthesize detailViewContainer = _detailViewContainer;
@synthesize detailViewControllers = _detailViewControllers;
@synthesize detailViews = _detailViews;
@synthesize detailViewWidths = _detailViewWidths;
@synthesize detailTapper = _detailTapper;
@synthesize panner = _panner;
@synthesize popPanelsView = _popPanelsView;
@synthesize sidebarBorderView = _sidebarBorderView;
@synthesize delegate;

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


if(IS_IPHONE && !self.presentedViewController) {
[SoundUtil playSwipeSound];
}
}

- (void)closeSidebarWithVelocity:(CGFloat)velocity {
_panned = NO;
[self enableDetailView];
[self setStackOffset:(DETAIL_LEDGE_OFFSET - DETAIL_OFFSET) withVelocity:velocity];

Expand Down Expand Up @@ -1038,6 +1028,7 @@ - (void)enableDetailView {
}

self.detailTapper = nil;
_panned = NO;

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

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
// ARD - I'm not sure this is the right spot for the panned = NO reset
if (gestureRecognizer == self.panner || gestureRecognizer.view == self.detailTapper) {
_panOrigin = _stackOffset;
_panned = NO;
}

if (gestureRecognizer == self.edgePanner && [touch.view isDescendantOfView:self.detailViewController.view] == NO) {
return NO;
}

return YES;
}

- (void)edgePanned:(UIScreenEdgePanGestureRecognizer *)sender
{
if (sender.state == UIGestureRecognizerStateEnded) {
[self showSidebar];
_panned = YES;
}
}

- (void)panned:(UIPanGestureRecognizer *)sender {
/*
_stackOffset is how many pixels the views are dragged to the left from the initial (sidebar open) position
Expand Down Expand Up @@ -1238,13 +1243,28 @@ - (void)addPanner {
} else {
[self.view addGestureRecognizer:panner];
}

if (IS_IOS7) {
UIScreenEdgePanGestureRecognizer *edgePanner = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector(edgePanned:)];
edgePanner.edges = UIRectEdgeLeft;
edgePanner.cancelsTouchesInView = YES;
edgePanner.delegate = self;
self.edgePanner = edgePanner;
[self.view addGestureRecognizer:edgePanner];
}
}

- (void)removePanner {
if (self.panner) {
[self.panner.view removeGestureRecognizer:self.panner];
}

if (self.edgePanner) {
[self.edgePanner.view removeGestureRecognizer:self.panner];
}

self.panner = nil;
self.edgePanner = nil;
}

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

_panned = NO;

if (self.navigationController) {
[self.navigationController pushViewController:viewController animated:animated];
} else {
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Classes/PostSettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ - (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath
case 1:
[WPMobileStats trackEventForWPCom:[self formattedStatEventString:StatsEventPostDetailSettingsClickedRemoveFeaturedImage]];
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];
[actionSheet showFromRect:cell.frame inView:self.view animated:YES];
[actionSheet showFromRect:cell.frame inView:tableView animated:YES];
break;
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Classes/ReaderPostDetailViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ - (void)viewWillAppear:(BOOL)animated {
if (IS_IPAD)
[self.panelNavigationController setToolbarHidden:NO forViewController:self animated:NO];

[self.post addObserver:self forKeyPath:@"isReblogged" options:NSKeyValueObservingOptionNew context:@"reblogging"];

[_headerView updateLayout];
[self showStoredComment];
}
Expand All @@ -190,8 +192,6 @@ - (void)viewDidAppear:(BOOL)animated {
if (lastSynced == nil || ABS([lastSynced timeIntervalSinceNow]) > ReaderPostDetailViewControllerRefreshTimeout) {
[self syncWithUserInteraction:NO];
}

[self.post addObserver:self forKeyPath:@"isReblogged" options:NSKeyValueObservingOptionNew context:@"reblogging"];
}


Expand Down
6 changes: 6 additions & 0 deletions WordPress/Classes/ReaderPostsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ - (void)handleTopicsButtonTapped:(id)sender {
ReaderTopicsViewController *controller = [[ReaderTopicsViewController alloc] initWithStyle:UITableViewStyleGrouped];
controller.delegate = self;
if (IS_IPAD) {
if (_popover) {
[_popover dismissPopoverAnimated:YES];
_popover = nil;
return;
}

_popover = [[UIPopoverController alloc] initWithContentViewController:controller];
_popover.popoverBackgroundViewClass = [WPPopoverBackgroundView class];

Expand Down
2 changes: 1 addition & 1 deletion WordPress/Classes/WPWebViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ - (void)viewDidLoad
toolbar.barTintColor = [WPStyleGuide littleEddieGrey];
toolbar.tintColor = [UIColor whiteColor];
} else {
UIColor *color = [UIColor UIColorFromHex:0x464646];
UIColor *color = [UIColor whiteColor];
backButton.tintColor = color;
forwardButton.tintColor = color;
refreshButton.tintColor = color;
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Info-beta.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>3.8</string>
<string>3.8.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Info-dev.plist
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>3.8</string>
<string>3.8.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.8</string>
<string>3.8.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -37,7 +37,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>3.8</string>
<string>3.8.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
Expand Down
10 changes: 5 additions & 5 deletions WordPress/Resources/UITableViewSwitchCell.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4504" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4510" systemVersion="12F37" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment defaultVersion="1536" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3734.1"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
Expand All @@ -15,15 +15,15 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="TextLabel" lineBreakMode="tailTruncation" minimumFontSize="10" id="5">
<rect key="frame" x="14.5" y="11" width="175" height="21"/>
<rect key="frame" x="15" y="11" width="175" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="Helvetica-Bold" family="Helvetica" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" id="6">
<rect key="frame" x="238.5" y="8" width="51" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<rect key="frame" x="221" y="5" width="51" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</switch>
</subviews>
</tableViewCellContentView>
Expand Down
Binary file modified WordPress/Resources/de.lproj/Localizable.strings
Binary file not shown.
Binary file modified WordPress/Resources/he.lproj/Localizable.strings
Binary file not shown.
Binary file modified WordPress/Resources/ru.lproj/Localizable.strings
Binary file not shown.
Binary file modified WordPress/Resources/sv.lproj/Localizable.strings
Binary file not shown.
24 changes: 12 additions & 12 deletions WordPress/WordPress.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3079,30 +3079,30 @@
850D22B21729EE8600EC6A16 /* NUX */ = {
isa = PBXGroup;
children = (
85D08A6F17342ECE00E2BBCA /* AddUsersBlogCell.h */,
85D08A7017342ECE00E2BBCA /* AddUsersBlogCell.m */,
85EC44D21739826A00686604 /* CreateAccountAndBlogViewController.h */,
85EC44D31739826A00686604 /* CreateAccountAndBlogViewController.m */,
858DE40D1730384F000AC628 /* GeneralWalkthroughViewController.h */,
858DE40E1730384F000AC628 /* GeneralWalkthroughViewController.m */,
85C720AF1730CEFA00460645 /* WPWalkthroughTextField.h */,
85C720B01730CEFA00460645 /* WPWalkthroughTextField.m */,
85E105841731A597001071A3 /* WPWalkthroughOverlayView.h */,
85E105851731A597001071A3 /* WPWalkthroughOverlayView.m */,
85E1058F1731D066001071A3 /* LoginCompletedWalkthroughViewController.h */,
85E105901731D066001071A3 /* LoginCompletedWalkthroughViewController.m */,
85D08A5C17332C4A00E2BBCA /* NewAddUsersBlogViewController.h */,
85D08A5D17332C4A00E2BBCA /* NewAddUsersBlogViewController.m */,
85D08A6F17342ECE00E2BBCA /* AddUsersBlogCell.h */,
85D08A7017342ECE00E2BBCA /* AddUsersBlogCell.m */,
85EC44D21739826A00686604 /* CreateAccountAndBlogViewController.h */,
85EC44D31739826A00686604 /* CreateAccountAndBlogViewController.m */,
85B6F7501742DAE800CE7F3A /* WPNUXBackButton.h */,
85B6F7511742DAE800CE7F3A /* WPNUXBackButton.m */,
85B6F74D1742DA1D00CE7F3A /* WPNUXMainButton.h */,
85B6F74E1742DA1D00CE7F3A /* WPNUXMainButton.m */,
85AD6AEA173CCF9E002CB896 /* WPNUXPrimaryButton.h */,
85AD6AEB173CCF9E002CB896 /* WPNUXPrimaryButton.m */,
85AD6AED173CCFDC002CB896 /* WPNUXSecondaryButton.h */,
85AD6AEE173CCFDC002CB896 /* WPNUXSecondaryButton.m */,
85B6F74D1742DA1D00CE7F3A /* WPNUXMainButton.h */,
85B6F74E1742DA1D00CE7F3A /* WPNUXMainButton.m */,
85AD6B1C17405887002CB896 /* WPNUXUtility.h */,
85AD6B1D17405888002CB896 /* WPNUXUtility.m */,
85B6F7501742DAE800CE7F3A /* WPNUXBackButton.h */,
85B6F7511742DAE800CE7F3A /* WPNUXBackButton.m */,
85E105841731A597001071A3 /* WPWalkthroughOverlayView.h */,
85E105851731A597001071A3 /* WPWalkthroughOverlayView.m */,
85C720AF1730CEFA00460645 /* WPWalkthroughTextField.h */,
85C720B01730CEFA00460645 /* WPWalkthroughTextField.m */,
);
name = NUX;
sourceTree = "<group>";
Expand Down

0 comments on commit 70f1b97

Please sign in to comment.