mirror of
https://github.com/faroukbmiled/RyukGram.git
synced 2026-08-09 04:26:16 +02:00
modded scinsta with additional features and fixes for recent instagram version
This commit is contained in:
+56
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// JGProgressHUDFadeAnimation.m
|
||||
// JGProgressHUD
|
||||
//
|
||||
// Created by Jonas Gessner on 20.7.14.
|
||||
// Copyright (c) 2014 Jonas Gessner. All rights reserved.
|
||||
//
|
||||
|
||||
#import "JGProgressHUDFadeAnimation.h"
|
||||
#import "JGProgressHUD.h"
|
||||
|
||||
@implementation JGProgressHUDFadeAnimation
|
||||
|
||||
#pragma mark - Initializers
|
||||
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.duration = 0.4;
|
||||
self.animationOptions = UIViewAnimationOptionCurveEaseInOut;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setAnimationOptions:(UIViewAnimationOptions)animationOptions {
|
||||
_animationOptions = (animationOptions | UIViewAnimationOptionBeginFromCurrentState);
|
||||
}
|
||||
|
||||
#pragma mark - Showing
|
||||
|
||||
- (void)show {
|
||||
[super show];
|
||||
|
||||
self.progressHUD.alpha = 0.0;
|
||||
self.progressHUD.hidden = NO;
|
||||
|
||||
[UIView animateWithDuration:self.duration delay:0.0 options:self.animationOptions animations:^{
|
||||
self.progressHUD.alpha = 1.0;
|
||||
} completion:^(BOOL __unused finished) {
|
||||
[self animationFinished];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Hiding
|
||||
|
||||
- (void)hide {
|
||||
[super hide];
|
||||
|
||||
[UIView animateWithDuration:self.duration delay:0.0 options:self.animationOptions animations:^{
|
||||
self.progressHUD.alpha = 0.0;
|
||||
} completion:^(BOOL __unused finished) {
|
||||
[self animationFinished];
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user