Skip to content
This repository

Full Screen on Tap #76

Open
wants to merge 2 commits into from

6 participants

Brian King Gulam Moledina Jhonny worldofjon ady-e-n babulprabhakar
Brian King

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:
#67

Brian King

Just realized that the inFullScreen is needed for rotation events. Will get that back in in a few.

Brian King KingOfBrian Fixed a rotation issue. didEnter is now triggered after the animation…
… that transitions to full screen is complete, rather than when it starts. also added a willExit to the transform delegate
0dc4285
Gulam Moledina
Owner

Thanks @KingOfBrian ! I'll check this out this weekend and let you know.

Brian King

FYI the closeTransform doesn't animate. I'm looking to fix that today-ish.

Jhonny
MaxZeng commented

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.

worldofjon

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?

ady-e-n

@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 ?

Brian King

I would think that works. I'm not using this code any more myself, so I'm not sure I'll be much help.

worldofjon
babulprabhakar

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 ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 1 author.

Apr 20, 2012
Brian King KingOfBrian Fixed a few issues with full size mode. Added a command to have a tap…
… transition to full size
ab8b584
Brian King KingOfBrian Fixed a rotation issue. didEnter is now triggered after the animation…
… that transitions to full screen is complete, rather than when it starts. also added a willExit to the transform delegate
0dc4285
This page is out of date. Refresh to see the latest.
6 GMGridView/GMGridView.h
@@ -94,6 +94,10 @@ typedef enum
94 94 // Cells
95 95 - (GMGridViewCell *)cellForItemAtIndex:(NSInteger)position; // Might return nil if cell not loaded yet
96 96
  97 +- (void)openTransformAtIndex:(NSInteger)position;
  98 +- (void)closeTransform;
  99 +- (BOOL)isInTransformingState;
  100 +
97 101 // Actions
98 102 - (void)reloadData;
99 103 - (void)insertObjectAtIndex:(NSInteger)index animated:(BOOL)animated;
@@ -185,6 +189,8 @@ typedef enum
185 189 @optional
186 190 - (void)GMGridView:(GMGridView *)gridView didStartTransformingCell:(GMGridViewCell *)cell;
187 191 - (void)GMGridView:(GMGridView *)gridView didEnterFullSizeForCell:(GMGridViewCell *)cell;
  192 +- (void)GMGridView:(GMGridView *)gridView willExitFullSizeForCell:(GMGridViewCell *)cell;
  193 +
188 194 - (void)GMGridView:(GMGridView *)gridView didEndTransformingCell:(GMGridViewCell *)cell;
189 195
190 196 @end
249 GMGridView/GMGridView.m
@@ -838,7 +838,7 @@ - (void)panGestureUpdated:(UIPanGestureRecognizer *)panGesture
838 838 case UIGestureRecognizerStateFailed:
839 839 {
840 840 [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(transformingGestureDidFinish) object:nil];
841   - [self performSelector:@selector(transformingGestureDidFinish) withObject:nil afterDelay:0.1];
  841 + [self performSelector:@selector(transformingGestureDidFinish) withObject:nil afterDelay:0.0];
842 842
843 843 self.scrollEnabled = YES;
844 844
@@ -879,7 +879,7 @@ - (void)pinchGestureUpdated:(UIPinchGestureRecognizer *)pinchGesture
879 879 case UIGestureRecognizerStateFailed:
880 880 {
881 881 [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(transformingGestureDidFinish) object:nil];
882   - [self performSelector:@selector(transformingGestureDidFinish) withObject:nil afterDelay:0.1];
  882 + [self performSelector:@selector(transformingGestureDidFinish) withObject:nil afterDelay:0.0];
883 883
884 884 break;
885 885 }
@@ -939,7 +939,7 @@ - (void)rotationGestureUpdated:(UIRotationGestureRecognizer *)rotationGesture
939 939 case UIGestureRecognizerStateFailed:
940 940 {
941 941 [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(transformingGestureDidFinish) object:nil];
942   - [self performSelector:@selector(transformingGestureDidFinish) withObject:nil afterDelay:0.1];
  942 + [self performSelector:@selector(transformingGestureDidFinish) withObject:nil afterDelay:0.0];
943 943
944 944 break;
945 945 }
@@ -963,6 +963,126 @@ - (void)rotationGestureUpdated:(UIRotationGestureRecognizer *)rotationGesture
963 963 }
964 964 }
965 965 }
  966 +- (void)startOpenTransformAtIndex:(NSInteger)index
  967 +{
  968 + _transformingItem = [self cellForItemAtIndex:index];
  969 +
  970 + CGRect frameInMainView = [self convertRect:_transformingItem.frame toView:self.mainSuperView];
  971 +
  972 + [_transformingItem removeFromSuperview];
  973 + _transformingItem.frame = self.mainSuperView.bounds;
  974 + _transformingItem.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
  975 + _transformingItem.contentView.frame = frameInMainView;
  976 + [self.mainSuperView addSubview:_transformingItem];
  977 + [self.mainSuperView bringSubviewToFront:_transformingItem];
  978 +
  979 + _transformingItem.fullSize = [self.transformDelegate GMGridView:self sizeInFullSizeForCell:_transformingItem atIndex:index inInterfaceOrientation:[[UIApplication sharedApplication] statusBarOrientation]];
  980 + _transformingItem.fullSizeView = [self.transformDelegate GMGridView:self fullSizeViewForCell:_transformingItem atIndex:index];
  981 +
  982 + if ([self.transformDelegate respondsToSelector:@selector(GMGridView:didStartTransformingCell:)])
  983 + {
  984 + [self.transformDelegate GMGridView:self didStartTransformingCell:_transformingItem];
  985 + }
  986 +}
  987 +- (void)completeOpenTransform
  988 +{
  989 + _lastRotation = 0;
  990 + _lastScale = 1;
  991 +
  992 + [self bringSubviewToFront:_transformingItem];
  993 +
  994 + [_transformingItem prepareContentToFullSize];
  995 +
  996 + [UIView animateWithDuration:0.3
  997 + animations:^{
  998 + [_transformingItem transitionContentToFullSize];
  999 + }
  1000 + completion:^(BOOL finished){
  1001 + [self setNeedsLayout];
  1002 + if ([self.transformDelegate respondsToSelector:@selector(GMGridView:didEnterFullSizeForCell:)])
  1003 + {
  1004 + [self.transformDelegate GMGridView:self didEnterFullSizeForCell:_transformingItem];
  1005 + }
  1006 + }
  1007 + ];
  1008 +
  1009 +
  1010 + _inTransformingState = YES;
  1011 + _inFullSizeMode = YES;
  1012 +
  1013 + // Transfer the gestures on the fullscreen to make is they are accessible (depends on self.mainSuperView)
  1014 + [_transformingItem.fullSizeView addGestureRecognizer:_pinchGesture];
  1015 + [_transformingItem.fullSizeView addGestureRecognizer:_rotationGesture];
  1016 + [_transformingItem.fullSizeView addGestureRecognizer:_panGesture];
  1017 +}
  1018 +
  1019 +- (void)startCloseTransform
  1020 +{
  1021 + _inTransformingState = NO;
  1022 + [_transformingItem prepareFullSizeToContent];
  1023 +
  1024 + if ([self.transformDelegate respondsToSelector:@selector(GMGridView:willExitFullSizeForCell:)])
  1025 + {
  1026 + [self.transformDelegate GMGridView:self willExitFullSizeForCell:_transformingItem];
  1027 + }
  1028 +
  1029 +
  1030 + [UIView animateWithDuration:0.3
  1031 + animations:^{
  1032 + [_transformingItem transitionFullSizeToContent];
  1033 + }
  1034 + completion:^(BOOL finished){
  1035 + [self setNeedsLayout];
  1036 + }
  1037 + ];
  1038 +}
  1039 +
  1040 +- (void)completeCloseTransform
  1041 +{
  1042 + _lastRotation = 0;
  1043 + _lastScale = 1.0;
  1044 +
  1045 + GMGridViewCell *transformingView = _transformingItem;
  1046 + _transformingItem = nil;
  1047 +
  1048 + NSInteger position = [self positionForItemSubview:transformingView];
  1049 + CGPoint origin = [self.layoutStrategy originForItemAtPosition:position];
  1050 +
  1051 + CGRect finalFrameInScroll = CGRectMake(origin.x, origin.y, _itemSize.width, _itemSize.height);
  1052 + CGRect finalFrameInSuperview = [self convertRect:finalFrameInScroll toView:self.mainSuperView];
  1053 +
  1054 +// [transformingView switchToFullSizeMode:NO];
  1055 + transformingView.autoresizingMask = UIViewAutoresizingNone;
  1056 + [UIView animateWithDuration: kDefaultAnimationDuration
  1057 + delay:0
  1058 + options: kDefaultAnimationOptions
  1059 + animations:^{
  1060 + transformingView.contentView.transform = CGAffineTransformIdentity;
  1061 + transformingView.contentView.frame = finalFrameInSuperview;
  1062 + transformingView.backgroundColor = [UIColor clearColor];
  1063 + }
  1064 + completion:^(BOOL finished){
  1065 + [transformingView removeFromSuperview];
  1066 + transformingView.frame = finalFrameInScroll;
  1067 + transformingView.contentView.frame = transformingView.bounds;
  1068 +
  1069 + transformingView.fullSizeView = nil;
  1070 + [self addSubview:transformingView];
  1071 +
  1072 + _inFullSizeMode = NO;
  1073 +
  1074 + if ([self.transformDelegate respondsToSelector:@selector(GMGridView:didEndTransformingCell:)])
  1075 + {
  1076 + [self.transformDelegate GMGridView:self didEndTransformingCell:transformingView];
  1077 + }
  1078 +
  1079 + // Transfer the gestures back
  1080 + [self addGestureRecognizer:_pinchGesture];
  1081 + [self addGestureRecognizer:_rotationGesture];
  1082 + [self addGestureRecognizer:_panGesture];
  1083 + }
  1084 + ];
  1085 +}
966 1086
967 1087 - (void)transformingGestureDidBeginWithGesture:(UIGestureRecognizer *)gesture
968 1088 {
@@ -975,37 +1095,14 @@ - (void)transformingGestureDidBeginWithGesture:(UIGestureRecognizer *)gesture
975 1095
976 1096 if (_inTransformingState)
977 1097 {
978   - _inTransformingState = NO;
979   -
980   - CGPoint center = _transformingItem.fullSizeView.center;
981   -
982   - [_transformingItem switchToFullSizeMode:NO];
983   - CGAffineTransform newTransform = CGAffineTransformMakeScale(2.5, 2.5);
984   - _transformingItem.contentView.transform = newTransform;
985   - _transformingItem.contentView.center = center;
  1098 + [self startCloseTransform];
986 1099 }
987 1100 else if (!_transformingItem)
988 1101 {
989 1102 CGPoint locationTouch = [gesture locationOfTouch:0 inView:self];
990 1103 NSInteger positionTouch = [self.layoutStrategy itemPositionFromLocation:locationTouch];
991   - _transformingItem = [self cellForItemAtIndex:positionTouch];
992   -
993   - CGRect frameInMainView = [self convertRect:_transformingItem.frame toView:self.mainSuperView];
994   -
995   - [_transformingItem removeFromSuperview];
996   - _transformingItem.frame = self.mainSuperView.bounds;
997   - _transformingItem.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
998   - _transformingItem.contentView.frame = frameInMainView;
999   - [self.mainSuperView addSubview:_transformingItem];
1000   - [self.mainSuperView bringSubviewToFront:_transformingItem];
1001   -
1002   - _transformingItem.fullSize = [self.transformDelegate GMGridView:self sizeInFullSizeForCell:_transformingItem atIndex:positionTouch inInterfaceOrientation:[[UIApplication sharedApplication] statusBarOrientation]];
1003   - _transformingItem.fullSizeView = [self.transformDelegate GMGridView:self fullSizeViewForCell:_transformingItem atIndex:positionTouch];
1004   -
1005   - if ([self.transformDelegate respondsToSelector:@selector(GMGridView:didStartTransformingCell:)])
1006   - {
1007   - [self.transformDelegate GMGridView:self didStartTransformingCell:_transformingItem];
1008   - }
  1104 +
  1105 + [self startOpenTransformAtIndex:positionTouch];
1009 1106 }
1010 1107 }
1011 1108
@@ -1019,93 +1116,27 @@ - (void)transformingGestureDidFinish
1019 1116 if ([self isInTransformingState])
1020 1117 {
1021 1118 if (_lastScale > 2 && !_inTransformingState)
1022   - {
1023   - _lastRotation = 0;
1024   - _lastScale = 1;
1025   -
1026   - [self bringSubviewToFront:_transformingItem];
1027   -
1028   - CGFloat rotationValue = atan2f(_transformingItem.contentView.transform.b, _transformingItem.contentView.transform.a);
1029   -
1030   - _transformingItem.contentView.transform = CGAffineTransformIdentity;
1031   -
1032   - [_transformingItem switchToFullSizeMode:YES];
1033   - _transformingItem.backgroundColor = [[UIColor darkGrayColor] colorWithAlphaComponent:0.9];
1034   -
1035   - _transformingItem.fullSizeView.transform = CGAffineTransformMakeRotation(rotationValue);
1036   -
1037   - [UIView animateWithDuration:kDefaultAnimationDuration
1038   - delay:0
1039   - options:kDefaultAnimationOptions
1040   - animations:^{
1041   - _transformingItem.fullSizeView.transform = CGAffineTransformIdentity;
1042   - }
1043   - completion:nil
1044   - ];
1045   -
1046   - _inTransformingState = YES;
1047   - _inFullSizeMode = YES;
1048   -
1049   - if ([self.transformDelegate respondsToSelector:@selector(GMGridView:didEnterFullSizeForCell:)])
1050   - {
1051   - [self.transformDelegate GMGridView:self didEnterFullSizeForCell:_transformingItem];
1052   - }
1053   -
1054   - // Transfer the gestures on the fullscreen to make is they are accessible (depends on self.mainSuperView)
1055   - [_transformingItem.fullSizeView addGestureRecognizer:_pinchGesture];
1056   - [_transformingItem.fullSizeView addGestureRecognizer:_rotationGesture];
1057   - [_transformingItem.fullSizeView addGestureRecognizer:_panGesture];
  1119 + {
  1120 + [self completeOpenTransform];
1058 1121 }
1059 1122 else if (!_inTransformingState)
1060 1123 {
1061   - _lastRotation = 0;
1062   - _lastScale = 1.0;
1063   -
1064   - GMGridViewCell *transformingView = _transformingItem;
1065   - _transformingItem = nil;
1066   -
1067   - NSInteger position = [self positionForItemSubview:transformingView];
1068   - CGPoint origin = [self.layoutStrategy originForItemAtPosition:position];
1069   -
1070   - CGRect finalFrameInScroll = CGRectMake(origin.x, origin.y, _itemSize.width, _itemSize.height);
1071   - CGRect finalFrameInSuperview = [self convertRect:finalFrameInScroll toView:self.mainSuperView];
1072   -
1073   - [transformingView switchToFullSizeMode:NO];
1074   - transformingView.autoresizingMask = UIViewAutoresizingNone;
1075   -
1076   - [UIView animateWithDuration: kDefaultAnimationDuration
1077   - delay:0
1078   - options: kDefaultAnimationOptions
1079   - animations:^{
1080   - transformingView.contentView.transform = CGAffineTransformIdentity;
1081   - transformingView.contentView.frame = finalFrameInSuperview;
1082   - transformingView.backgroundColor = [UIColor clearColor];
1083   - }
1084   - completion:^(BOOL finished){
1085   -
1086   - [transformingView removeFromSuperview];
1087   - transformingView.frame = finalFrameInScroll;
1088   - transformingView.contentView.frame = transformingView.bounds;
1089   - [self addSubview:transformingView];
1090   -
1091   - transformingView.fullSizeView = nil;
1092   - _inFullSizeMode = NO;
1093   -
1094   - if ([self.transformDelegate respondsToSelector:@selector(GMGridView:didEndTransformingCell:)])
1095   - {
1096   - [self.transformDelegate GMGridView:self didEndTransformingCell:transformingView];
1097   - }
1098   -
1099   - // Transfer the gestures back
1100   - [self addGestureRecognizer:_pinchGesture];
1101   - [self addGestureRecognizer:_rotationGesture];
1102   - [self addGestureRecognizer:_panGesture];
1103   - }
1104   - ];
  1124 + [self completeCloseTransform];
1105 1125 }
1106 1126 }
1107 1127 }
1108 1128
  1129 +- (void)openTransformAtIndex:(NSInteger)position
  1130 +{
  1131 + [self startOpenTransformAtIndex:position];
  1132 + [self completeOpenTransform];
  1133 +}
  1134 +- (void)closeTransform
  1135 +{
  1136 + [self startCloseTransform];
  1137 + [self completeCloseTransform];
  1138 +}
  1139 +
1109 1140 //////////////////////////////////////////////////////////////
1110 1141 #pragma mark Tap gesture
1111 1142 //////////////////////////////////////////////////////////////
5 GMGridView/GMGridViewCell+Extended.h
@@ -58,5 +58,10 @@ typedef void (^GMGridViewCellDeleteBlock)(GMGridViewCell*);
58 58
59 59 - (void)switchToFullSizeMode:(BOOL)fullSizeEnabled;
60 60 - (void)stepToFullsizeWithAlpha:(CGFloat)alpha; // not supported yet
  61 +- (void)prepareContentToFullSize;
  62 +- (void)transitionContentToFullSize;
  63 +
  64 +- (void)prepareFullSizeToContent;
  65 +- (void)transitionFullSizeToContent;
61 66
62 67 @end
83 GMGridView/GMGridViewCell.m
@@ -250,6 +250,53 @@ - (void)actionDelete
250 250 //////////////////////////////////////////////////////////////
251 251 #pragma mark Public methods
252 252 //////////////////////////////////////////////////////////////
  253 +- (void)prepareContentToFullSize
  254 +{
  255 + // Transfer center, rotation and scale to the full size view
  256 + CGFloat rotationValue = atan2f(self.contentView.transform.b, self.contentView.transform.a);
  257 + CGFloat sx = self.contentView.frame.size.width / self.fullSizeView.frame.size.width;
  258 + CGFloat sy = self.contentView.frame.size.height / self.fullSizeView.frame.size.height;
  259 + CGFloat tx = self.contentView.center.x - self.fullSizeView.center.x;
  260 + CGFloat ty = self.contentView.center.y - self.fullSizeView.center.y;
  261 +
  262 + CGAffineTransform transform = CGAffineTransformMakeTranslation(tx,ty);
  263 + transform = CGAffineTransformScale(transform, sx, sy);
  264 + self.fullSizeView.transform = CGAffineTransformRotate(transform, rotationValue);
  265 +
  266 + // Reset the resize mask for full screen mode
  267 + self.fullSizeView.autoresizingMask = self.defaultFullsizeViewResizingMask;
  268 +
  269 + // Put the fullsize view at the top alpha level and hide contentView
  270 + self.fullSizeView.alpha = MAX(self.fullSizeView.alpha, self.contentView.alpha);
  271 + self.contentView.alpha = 0;
  272 +}
  273 +
  274 +- (void)transitionContentToFullSize
  275 +{
  276 + // Animate fullSizeView back to it's intended state
  277 + CGPoint center = self.fullSizeView.center;
  278 + self.fullSizeView.alpha = 1;
  279 + self.fullSizeView.transform = CGAffineTransformIdentity;
  280 + self.fullSizeView.center = center;
  281 + self.fullSizeView.frame = CGRectMake(self.fullSizeView.frame.origin.x,
  282 + self.fullSizeView.frame.origin.y,
  283 + self.fullSize.width,
  284 + self.fullSize.height);
  285 +}
  286 +
  287 +- (void)prepareFullSizeToContent
  288 +{
  289 + self.fullSizeView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
  290 +
  291 + self.fullSizeView.alpha = 0;
  292 + self.contentView.alpha = 0.6;
  293 +}
  294 +
  295 +- (void)transitionFullSizeToContent
  296 +{
  297 + self.contentView.alpha = 1;
  298 + self.fullSizeView.frame = self.bounds;
  299 +}
253 300
254 301 - (void)prepareForReuse
255 302 {
@@ -272,45 +319,11 @@ - (void)switchToFullSizeMode:(BOOL)fullSizeEnabled
272 319 {
273 320 if (fullSizeEnabled)
274 321 {
275   - self.fullSizeView.autoresizingMask = self.defaultFullsizeViewResizingMask;
276   -
277   - CGPoint center = self.fullSizeView.center;
278   - self.fullSizeView.frame = CGRectMake(self.fullSizeView.frame.origin.x, self.fullSizeView.frame.origin.y, self.fullSize.width, self.fullSize.height);
279   - self.fullSizeView.center = center;
280   -
281   - _inFullSizeMode = YES;
282   -
283   - self.fullSizeView.alpha = MAX(self.fullSizeView.alpha, self.contentView.alpha);
284   - self.contentView.alpha = 0;
285   -
286   - [UIView animateWithDuration:0.3
287   - animations:^{
288   - self.fullSizeView.alpha = 1;
289   - self.fullSizeView.frame = CGRectMake(self.fullSizeView.frame.origin.x, self.fullSizeView.frame.origin.y, self.fullSize.width, self.fullSize.height);
290   - self.fullSizeView.center = center;
291   - }
292   - completion:^(BOOL finished){
293   - [self setNeedsLayout];
294   - }
295   - ];
  322 + _inFullSizeMode = YES;
296 323 }
297 324 else
298 325 {
299   - self.fullSizeView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
300   -
301 326 _inFullSizeMode = NO;
302   - self.fullSizeView.alpha = 0;
303   - self.contentView.alpha = 0.6;
304   -
305   - [UIView animateWithDuration:0.3
306   - animations:^{
307   - self.contentView.alpha = 1;
308   - self.fullSizeView.frame = self.bounds;
309   - }
310   - completion:^(BOOL finished){
311   - [self setNeedsLayout];
312   - }
313   - ];
314 327 }
315 328 }
316 329

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.