@@ -253,30 +253,30 @@ -(void) expandToOffset:(CGFloat) offset settings:(MGSwipeExpansionSettings*) set
253
253
254
254
CGFloat duration = _fromLeft ? _cell.leftExpansion .animationDuration : _cell.rightExpansion .animationDuration ;
255
255
[UIView animateWithDuration: duration delay: 0 options: UIViewAnimationOptionBeginFromCurrentState animations: ^{
256
- _expandedButton.hidden = NO ;
257
-
258
- if (_expansionLayout == MGSwipeExpansionLayoutCenter) {
259
- _expandedButtonBoundsCopy = _expandedButton.bounds ;
260
- _expandedButton.layer .mask = nil ;
261
- _expandedButton.layer .transform = CATransform3DIdentity;
262
- _expandedButton.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
263
- [_expandedButton.superview bringSubviewToFront: _expandedButton];
264
- _expandedButton.frame = _container.bounds ;
265
- _expansionBackground.frame = [self expansionBackgroundRect: _expandedButton];
256
+ self-> _expandedButton .hidden = NO ;
257
+
258
+ if (self-> _expansionLayout == MGSwipeExpansionLayoutCenter) {
259
+ self-> _expandedButtonBoundsCopy = self-> _expandedButton .bounds ;
260
+ self-> _expandedButton .layer .mask = nil ;
261
+ self-> _expandedButton .layer .transform = CATransform3DIdentity;
262
+ self-> _expandedButton .autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
263
+ [self -> _expandedButton.superview bringSubviewToFront: self -> _expandedButton];
264
+ self-> _expandedButton .frame = self-> _container .bounds ;
265
+ self-> _expansionBackground .frame = [self expansionBackgroundRect: self -> _expandedButton];
266
266
}
267
- else if (_expansionLayout == MGSwipeExpansionLayoutNone) {
268
- [_expandedButton.superview bringSubviewToFront: _expandedButton];
269
- _expansionBackground.frame = _container.bounds ;
267
+ else if (self-> _expansionLayout == MGSwipeExpansionLayoutNone) {
268
+ [self -> _expandedButton.superview bringSubviewToFront: self -> _expandedButton];
269
+ self-> _expansionBackground .frame = self-> _container .bounds ;
270
270
}
271
- else if (_fromLeft) {
272
- _expandedButton.frame = CGRectMake (_container.bounds .size .width - _expandedButton.bounds .size .width , 0 , _expandedButton.bounds .size .width , _expandedButton.bounds .size .height );
273
- _expandedButton.autoresizingMask |= UIViewAutoresizingFlexibleLeftMargin;
274
- _expansionBackground.frame = [self expansionBackgroundRect: _expandedButton];
271
+ else if (self-> _fromLeft ) {
272
+ self-> _expandedButton .frame = CGRectMake (self-> _container .bounds .size .width - self-> _expandedButton .bounds .size .width , 0 , self-> _expandedButton .bounds .size .width , self-> _expandedButton .bounds .size .height );
273
+ self-> _expandedButton .autoresizingMask |= UIViewAutoresizingFlexibleLeftMargin;
274
+ self-> _expansionBackground .frame = [self expansionBackgroundRect: self -> _expandedButton];
275
275
}
276
276
else {
277
- _expandedButton.frame = CGRectMake (0 , 0 , _expandedButton.bounds .size .width , _expandedButton.bounds .size .height );
278
- _expandedButton.autoresizingMask |= UIViewAutoresizingFlexibleRightMargin;
279
- _expansionBackground.frame = [self expansionBackgroundRect: _expandedButton];
277
+ self-> _expandedButton .frame = CGRectMake (0 , 0 , self-> _expandedButton .bounds .size .width , self-> _expandedButton .bounds .size .height );
278
+ self-> _expandedButton .autoresizingMask |= UIViewAutoresizingFlexibleRightMargin;
279
+ self-> _expansionBackground .frame = [self expansionBackgroundRect: self -> _expandedButton];
280
280
}
281
281
282
282
} completion: ^(BOOL finished) {
@@ -303,14 +303,14 @@ -(void) endExpansionAnimated:(BOOL) animated
303
303
}
304
304
CGFloat duration = _fromLeft ? _cell.leftExpansion .animationDuration : _cell.rightExpansion .animationDuration ;
305
305
[UIView animateWithDuration: animated ? duration : 0.0 delay: 0 options: UIViewAnimationOptionBeginFromCurrentState animations: ^{
306
- _container.frame = self.bounds ;
307
- if (_expansionLayout == MGSwipeExpansionLayoutCenter) {
308
- _expandedButtonAnimated.frame = _expandedButtonBoundsCopy;
306
+ self-> _container .frame = self.bounds ;
307
+ if (self-> _expansionLayout == MGSwipeExpansionLayoutCenter) {
308
+ self-> _expandedButtonAnimated .frame = self-> _expandedButtonBoundsCopy ;
309
309
}
310
310
[self resetButtons ];
311
- _expansionBackgroundAnimated.frame = [self expansionBackgroundRect: _expandedButtonAnimated];
311
+ self-> _expansionBackgroundAnimated .frame = [self expansionBackgroundRect: self -> _expandedButtonAnimated];
312
312
} completion: ^(BOOL finished) {
313
- [_expansionBackgroundAnimated removeFromSuperview ];
313
+ [self -> _expansionBackgroundAnimated removeFromSuperview ];
314
314
}];
315
315
}
316
316
else if (_expansionBackground) {
0 commit comments