Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-iOS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
311
Issues
311
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
VLC-iOS
Commits
c9638027
Commit
c9638027
authored
Mar 30, 2014
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use our own fork of LXReorderableCollectionViewFlowLayout with our patches applied
parent
decc24b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
151 deletions
+1
-151
compileVLCforiOS.sh
compileVLCforiOS.sh
+1
-9
patches/lxreorderablecollectionviewflowlayout/0001-conform-to-c99-to-compile.patch
...ectionviewflowlayout/0001-conform-to-c99-to-compile.patch
+0
-84
patches/lxreorderablecollectionviewflowlayout/0002-Added-a-delegate-method-to-remove-item-from-folder.patch
...-Added-a-delegate-method-to-remove-item-from-folder.patch
+0
-58
No files found.
compileVLCforiOS.sh
View file @
c9638027
...
...
@@ -213,15 +213,7 @@ else
cd
GHSidebarNav
&&
git pull
--rebase
&&
cd
..
fi
if
!
[
-e
LXReorderableCollectionViewFlowLayout
]
;
then
git clone git://github.com/lxcid/LXReorderableCollectionViewFlowLayout.git
cd
LXReorderableCollectionViewFlowLayout
git am ../../patches/lxreorderablecollectionviewflowlayout/
*
.patch
if
[
$?
-ne
0
]
;
then
git am
--abort
info
"Applying the patches failed, aborting git-am"
exit
1
fi
cd
..
git clone git://github.com/fkuehne/LXReorderableCollectionViewFlowLayout.git
else
cd
LXReorderableCollectionViewFlowLayout
&&
git pull
--rebase
&&
cd
..
fi
...
...
patches/lxreorderablecollectionviewflowlayout/0001-conform-to-c99-to-compile.patch
deleted
100644 → 0
View file @
decc24b0
From 16a7249fe7149b471a5c1eb7d70a83aa3b6625e3 Mon Sep 17 00:00:00 2001
From: Carola Nitz <nitz.carola@googlemail.com>
Date: Fri, 7 Feb 2014 21:54:18 +0100
Subject: [PATCH] conform to c99 to compile
---
.../LXReorderableCollectionViewFlowLayout.m | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m b/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m
index 744cc30..5e7008f 100755
--- a/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m
+++ b/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m
@@ -162,15 +162,15 @@
static NSString * const kLXCollectionViewKeyPath = @"collectionView";
[self.dataSource collectionView:self.collectionView itemAtIndexPath:previousIndexPath willMoveToIndexPath:newIndexPath];
}
- __weak typeof(self) weakSelf = self;
+ __weak __typeof(self) weakSelf = self;
[self.collectionView performBatchUpdates:^{
- __strong typeof(self) strongSelf = weakSelf;
+ __strong __typeof(self) strongSelf = weakSelf;
if (strongSelf) {
[strongSelf.collectionView deleteItemsAtIndexPaths:@[ previousIndexPath ]];
[strongSelf.collectionView insertItemsAtIndexPaths:@[ newIndexPath ]];
}
} completion:^(BOOL finished) {
- __strong typeof(self) strongSelf = weakSelf;
+ __strong __typeof(self) strongSelf = weakSelf;
if ([strongSelf.dataSource respondsToSelector:@selector(collectionView:itemAtIndexPath:didMoveToIndexPath:)]) {
[strongSelf.dataSource collectionView:strongSelf.collectionView itemAtIndexPath:previousIndexPath didMoveToIndexPath:newIndexPath];
}
@@ -304,13 +304,13 @@
static NSString * const kLXCollectionViewKeyPath = @"collectionView";
self.currentViewCenter = self.currentView.center;
- __weak typeof(self) weakSelf = self;
+ __weak __typeof(self) weakSelf = self;
[UIView
animateWithDuration:0.3
delay:0.0
options:UIViewAnimationOptionBeginFromCurrentState
animations:^{
- __strong typeof(self) strongSelf = weakSelf;
+ __strong __typeof(self) strongSelf = weakSelf;
if (strongSelf) {
strongSelf.currentView.transform = CGAffineTransformMakeScale(1.1f, 1.1f);
highlightedImageView.alpha = 0.0f;
@@ -318,7 +318,7 @@
static NSString * const kLXCollectionViewKeyPath = @"collectionView";
}
}
completion:^(BOOL finished) {
- __strong typeof(self) strongSelf = weakSelf;
+ __strong __typeof(self) strongSelf = weakSelf;
if (strongSelf) {
[highlightedImageView removeFromSuperview];
@@ -344,20 +344,20 @@
static NSString * const kLXCollectionViewKeyPath = @"collectionView";
UICollectionViewLayoutAttributes *layoutAttributes = [self layoutAttributesForItemAtIndexPath:currentIndexPath];
- __weak typeof(self) weakSelf = self;
+ __weak __typeof(self) weakSelf = self;
[UIView
animateWithDuration:0.3
delay:0.0
options:UIViewAnimationOptionBeginFromCurrentState
animations:^{
- __strong typeof(self) strongSelf = weakSelf;
+ __strong __typeof(self) strongSelf = weakSelf;
if (strongSelf) {
strongSelf.currentView.transform = CGAffineTransformMakeScale(1.0f, 1.0f);
strongSelf.currentView.center = layoutAttributes.center;
}
}
completion:^(BOOL finished) {
- __strong typeof(self) strongSelf = weakSelf;
+ __strong __typeof(self) strongSelf = weakSelf;
if (strongSelf) {
[strongSelf.currentView removeFromSuperview];
strongSelf.currentView = nil;
--
1.8.3.4 (Apple Git-47)
patches/lxreorderablecollectionviewflowlayout/0002-Added-a-delegate-method-to-remove-item-from-folder.patch
deleted
100644 → 0
View file @
decc24b0
From fa0aabe932016b67a37b82b04dd21e2b4bdfad12 Mon Sep 17 00:00:00 2001
From: Carola Nitz <nitz.carola@googlemail.com>
Date: Mon, 24 Mar 2014 22:12:53 +0100
Subject: [PATCH] Added a delegate method to remove item from folder
---
.../LXReorderableCollectionViewFlowLayout.h | 1 +
.../LXReorderableCollectionViewFlowLayout.m | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.h b/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.h
index 76617f4..45c3843 100755
--- a/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.h
+++ b/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.h
@@ -24,6 +24,7 @@
- (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath willMoveToIndexPath:(NSIndexPath *)toIndexPath;
- (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath didMoveToIndexPath:(NSIndexPath *)toIndexPath;
+- (void)collectionView:(UICollectionView *)collectionView removeItemFromFolderAtIndexPathIfNeeded:(NSIndexPath *)indexPath;
- (BOOL)collectionView:(UICollectionView *)collectionView canMoveItemAtIndexPath:(NSIndexPath *)indexPath;
- (BOOL)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath canMoveToIndexPath:(NSIndexPath *)toIndexPath;
diff --git a/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m b/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m
index e1289b2..abf5a98 100755
--- a/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m
+++ b/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m
@@ -240,6 +240,7 @@
static NSString * const kLXCollectionViewKeyPath = @"collectionView";
translation = CGPointMake(0.0f, distance);
} break;
case LXScrollingDirectionLeft: {
+ [self.dataSource collectionView:self.collectionView removeItemFromFolderAtIndexPathIfNeeded:_selectedItemIndexPath];
distance = -distance;
CGFloat minX = 0.0f - contentInset.left;
@@ -250,6 +251,7 @@
static NSString * const kLXCollectionViewKeyPath = @"collectionView";
translation = CGPointMake(distance, 0.0f);
} break;
case LXScrollingDirectionRight: {
+ [self.dataSource collectionView:self.collectionView removeItemFromFolderAtIndexPathIfNeeded:_selectedItemIndexPath];
CGFloat maxX = MAX(contentSize.width, frameSize.width) - frameSize.width + contentInset.right;
if ((contentOffset.x + distance) >= maxX) {
@@ -384,7 +386,11 @@
static NSString * const kLXCollectionViewKeyPath = @"collectionView";
CGPoint viewCenter = self.currentView.center = LXS_CGPointAdd(self.currentViewCenter, self.panTranslationInCollectionView);
[self invalidateLayoutIfNecessary];
-
+ //TODO: start a timer to not immediately trigger the remove from folder
+ if (self.currentView.center.x < 0 || self.currentView.center.x > self.collectionView.frame.size.width) {
+ [self.dataSource collectionView:self.collectionView removeItemFromFolderAtIndexPathIfNeeded:_selectedItemIndexPath];
+ [self.currentView removeFromSuperview];
+ }
switch (self.scrollDirection) {
case UICollectionViewScrollDirectionVertical: {
if (viewCenter.y < (CGRectGetMinY(self.collectionView.bounds) + self.scrollingTriggerEdgeInsets.top)) {
--
1.8.5.2 (Apple Git-48)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment