Skip to content

Commit

Permalink
Revert line paddings to the original state
Browse files Browse the repository at this point in the history
  • Loading branch information
stanmots committed Apr 10, 2016
1 parent 559aaba commit a55e011
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
1 change: 0 additions & 1 deletion CTAssetsPickerController/CTAssetCollectionViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ - (instancetype)init
if (self = [super initWithStyle:UITableViewStylePlain])
{
_imageManager = [PHCachingImageManager new];

[self addNotificationObserver];
}

Expand Down
10 changes: 8 additions & 2 deletions CTAssetsPickerController/CTAssetItemViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ of this software and associated documentation files (the "Software"), to deal
*/


#import <PureLayout/PureLayout.h>
#import "CTAssetsPickerController.h"
#import "CTAssetItemViewController.h"
Expand All @@ -33,6 +34,8 @@ of this software and associated documentation files (the "Software"), to deal
#import "PHImageManager+CTAssetsPickerController.h"




@interface CTAssetItemViewController ()

@property (nonatomic, weak) CTAssetsPickerController *picker;
Expand All @@ -50,6 +53,9 @@ @interface CTAssetItemViewController ()
@end





@implementation CTAssetItemViewController

+ (CTAssetItemViewController *)assetItemViewControllerForAsset:(PHAsset *)asset
Expand Down Expand Up @@ -202,7 +208,7 @@ - (void)requestAssetImage

// this image is set for transition animation
self.image = image;

dispatch_async(dispatch_get_main_queue(), ^{

NSError *error = info[PHImageErrorKey];
Expand Down Expand Up @@ -231,7 +237,7 @@ - (PHImageRequestOptions *)imageRequestOptions
[self.scrollView setProgress:progress];
});
};

return options;
}

Expand Down
6 changes: 4 additions & 2 deletions CTAssetsPickerController/CTAssetScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ of this software and associated documentation files (the "Software"), to deal
*/


#import <PureLayout/PureLayout.h>
#import "CTAssetScrollView.h"
#import "CTAssetPlayButton.h"
Expand All @@ -33,6 +32,8 @@ of this software and associated documentation files (the "Software"), to deal
#import "UIImage+CTAssetsPickerController.h"




NSString * const CTAssetScrollViewDidTapNotification = @"CTAssetScrollViewDidTapNotification";
NSString * const CTAssetScrollViewPlayerWillPlayNotification = @"CTAssetScrollViewPlayerWillPlayNotification";
NSString * const CTAssetScrollViewPlayerWillPauseNotification = @"CTAssetScrollViewPlayerWillPauseNotification";
Expand Down Expand Up @@ -289,7 +290,7 @@ - (void)bind:(PHAsset *)asset image:(UIImage *)image requestInfo:(NSDictionary *
self.playButton.hidden = [asset ctassetsPickerIsPhoto];

BOOL isDegraded = [info[PHImageResultIsDegradedKey] boolValue];

if (self.image == nil || !isDegraded)
{
BOOL zoom = (!self.image);
Expand Down Expand Up @@ -347,6 +348,7 @@ - (void)unbindPlayerItem
}



#pragma mark - Upate zoom scales

- (void)updateZoomScalesAndZoom:(BOOL)zoom
Expand Down
1 change: 0 additions & 1 deletion CTAssetsPickerController/CTAssetsGridViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
@property (nonatomic, weak) id<CTAssetsGridViewControllerDelegate> delegate;
@property (nonatomic, strong, nonnull) PHAssetCollection *assetCollection;


@end


4 changes: 2 additions & 2 deletions CTAssetsPickerController/CTAssetsPageViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ - (void)setPageIndex:(NSInteger)pageIndex

CTAssetItemViewController *page = [CTAssetItemViewController assetItemViewControllerForAsset:asset];
page.allowsSelection = self.allowsSelection;

[self setViewControllers:@[page]
direction:UIPageViewControllerNavigationDirectionForward
animated:NO
Expand Down Expand Up @@ -234,7 +234,7 @@ - (UIViewController *)pageViewController:(UIPageViewController *)pageViewControl
PHAsset *beforeAsset = self.assets[(index - 1)];
CTAssetItemViewController *page = [CTAssetItemViewController assetItemViewControllerForAsset:beforeAsset];
page.allowsSelection = self.allowsSelection;

return page;
}

Expand Down
1 change: 0 additions & 1 deletion CTAssetsPickerController/CTAssetsPickerController.m
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ - (void)setupEmptyViewController
- (void)setupSplitViewController
{
CTAssetCollectionViewController *vc = [CTAssetCollectionViewController new];

CTAssetsNavigationController *master = [[CTAssetsNavigationController alloc] initWithRootViewController:vc];
UINavigationController *detail = [self emptyNavigationController];
UISplitViewController *svc = [UISplitViewController new];
Expand Down
2 changes: 0 additions & 2 deletions CTAssetsPickerDemo/CTMasterViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N

if (row == 5)
title = @"UI tweaks";

}

if (section == 1)
Expand Down Expand Up @@ -242,7 +241,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath

if (row == 5)
vc = (UIViewController *)[CTUITweaksViewController new];

}

if (section == 1)
Expand Down

0 comments on commit a55e011

Please sign in to comment.