Fix build

This commit is contained in:
Ilya Laktyushin 2020-04-03 18:50:59 +04:00
parent 822eaf23b0
commit d57b595fc6

View File

@ -11,7 +11,7 @@
const CGFloat TGMenuSheetButtonItemViewHeight = 57.0f; const CGFloat TGMenuSheetButtonItemViewHeight = 57.0f;
@interface TGMenuSheetButtonItemView () <UIPointerInteractionDelegate> @interface TGMenuSheetButtonItemView () //<UIPointerInteractionDelegate>
{ {
bool _dark; bool _dark;
bool _requiresDivider; bool _requiresDivider;
@ -58,36 +58,36 @@ const CGFloat TGMenuSheetButtonItemViewHeight = 57.0f;
strongSelf.highlightUpdateBlock(highlighted); strongSelf.highlightUpdateBlock(highlighted);
}; };
if (iosMajorVersion() > 13 || (iosMajorVersion() == 13 && iosMinorVersion() >= 4)) { // if (iosMajorVersion() > 13 || (iosMajorVersion() == 13 && iosMinorVersion() >= 4)) {
UIPointerInteraction *pointerInteraction = [[UIPointerInteraction alloc] initWithDelegate:self]; // UIPointerInteraction *pointerInteraction = [[UIPointerInteraction alloc] initWithDelegate:self];
[self addInteraction:pointerInteraction]; // [self addInteraction:pointerInteraction];
} // }
} }
return self; return self;
} }
- (UIPointerStyle *)pointerInteraction:(UIPointerInteraction *)interaction styleForRegion:(UIPointerRegion *)region { //- (UIPointerStyle *)pointerInteraction:(UIPointerInteraction *)interaction styleForRegion:(UIPointerRegion *)region {
if (interaction.view != nil) { // if (interaction.view != nil) {
UITargetedPreview *targetedPreview = [[UITargetedPreview alloc] initWithView:interaction.view]; // UITargetedPreview *targetedPreview = [[UITargetedPreview alloc] initWithView:interaction.view];
UIPointerHoverEffect *effect = [UIPointerHoverEffect effectWithPreview:targetedPreview]; // UIPointerHoverEffect *effect = [UIPointerHoverEffect effectWithPreview:targetedPreview];
effect.preferredTintMode = UIPointerEffectTintModeNone; // effect.preferredTintMode = UIPointerEffectTintModeNone;
effect.prefersScaledContent = false; // effect.prefersScaledContent = false;
return [UIPointerStyle styleWithEffect:effect shape:nil]; // return [UIPointerStyle styleWithEffect:effect shape:nil];
} // }
return nil; // return nil;
} //}
//
- (void)pointerInteraction:(UIPointerInteraction *)interaction willEnterRegion:(UIPointerRegion *)region animator:(id<UIPointerInteractionAnimating>)animator { //- (void)pointerInteraction:(UIPointerInteraction *)interaction willEnterRegion:(UIPointerRegion *)region animator:(id<UIPointerInteractionAnimating>)animator {
[animator addAnimations:^{ // [animator addAnimations:^{
_highlightView.alpha = 0.75f; // _highlightView.alpha = 0.75f;
}]; // }];
} //}
//
- (void)pointerInteraction:(UIPointerInteraction *)interaction willExitRegion:(UIPointerRegion *)region animator:(id<UIPointerInteractionAnimating>)animator { //- (void)pointerInteraction:(UIPointerInteraction *)interaction willExitRegion:(UIPointerRegion *)region animator:(id<UIPointerInteractionAnimating>)animator {
[animator addAnimations:^{ // [animator addAnimations:^{
_highlightView.alpha = 0.0f; // _highlightView.alpha = 0.0f;
}]; // }];
} //}
- (void)setDark - (void)setDark
{ {