GMGridView
GMGridView copied to clipboard
Full Screen on Tap
Added some code for this. It's a bit crufty, but I wanted some feedback.
Notes:
- Not sure I manage the inFullScreen flag correctly in the cell, and I'm not sure that it's needed. I commented out layoutSubviews and things appear to be working fine, but I'm not sure if there is a purpose of the code that I am not executing
- Moved some animation configuration from GMGridView into the cell
- There was an ordering issue with transferring the full screen view superview that was calling the container view controller to get view[Did/Will]Disappear twice.
- When you pull your full screen view larger than it is, it will animate back correctly instead of snap.
Not sure how to assign it to this issue: https://github.com/gmoledina/GMGridView/issues/67
Just realized that the inFullScreen is needed for rotation events. Will get that back in in a few.
Thanks @KingOfBrian ! I'll check this out this weekend and let you know.
FYI the closeTransform doesn't animate. I'm looking to fix that today-ish.
I want this feature too !!!! The fullscreen mode require two hands to be triggered, one hand holding the iPhone, while another hand performs the pinch gesture.....
For iPad, that is OK, because we always use two hands to use the iPad.
Hi,
I added a method to go fullscreen after scrollToObjectAtIndex
-
(void)scrollToObjectAtIndex:(NSInteger)index atScrollPosition:(GMGridViewScrollPosition)scrollPosition animated:(BOOL)animated { ...........
// Better performance animating ourselves instead of using animated:YES in scrollRectToVisible [UIView animateWithDuration:animated ? kDefaultAnimationDuration : 0 delay:0 options:kDefaultAnimationOptions animations:^{ [self scrollRectToVisible:targetRect animated:NO]; } completion:^(BOOL finished){ [self performSelector:@selector(openTransformAtIndexNumber:) withObject:[NSNumber numberWithInt:index] afterDelay:1]; } ]; }
and
- (void)openTransformAtIndexNumber:(NSNumber *)position { [self startOpenTransformAtIndex:[position integerValue]]; [self completeOpenTransform]; }
but it only occasionally works. Any Ideas why?
@KingOfBrian how do i call the fullsize method on tap ?
i tried to call openTransformAtIndex:(NSInteger)position in
- (void)GMGridView:(GMGridView *)gridView didTapOnItemAtIndex:(NSInteger)position { NSLog(@"Did tap at index %d", position);
}
can you please let me know how to i call the method implemented by you in order to go to fullscreen on tap ?
I would think that works. I'm not using this code any more myself, so I'm not sure I'll be much help.
thanks Brian, why are you sending me this information?
On 21 October 2013 16:32, Brian King [email protected] wrote:
I would think that works. I'm not using this code any more myself, so I'm not sure I'll be much help.
— Reply to this email directly or view it on GitHubhttps://github.com/gmoledina/GMGridView/pull/76#issuecomment-26727608 .
Hey guys, great Work with grid View but i am getting stuck at some point in my code . i want to implement expandable cell with you gmgridview cell but unable to implement transformation delegate it never gets called even in your example
- (CGSize)GMGridView:(GMGridView *)gridView sizeInFullSizeForCell:(GMGridViewCell *)cell atIndex:(NSInteger)index inInterfaceOrientation:(UIInterfaceOrientation)orientation { CGSize viewSize = self.view.bounds.size; return CGSizeMake(viewSize.width - 50, viewSize.height - 50); }
please help ..