SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit e381ebd1eaf2a16924d7763d02dd29dbcf1b23db parent 34c29b052eb4db43f97f17719c93102b7630ec01 Author: Lior Halphon <LIJI32@gmail.com> Date: Sat, 28 Jun 2025 21:29:26 +0300 Refine the tip animation Diffstat:
| M | iOS/GBMenuViewController.m | 17 | ++++++++--------- |
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/iOS/GBMenuViewController.m b/iOS/GBMenuViewController.m @@ -120,7 +120,7 @@ static NSString *const tips[] = { effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleProminent]; } - _effectView = [[UIVisualEffectView alloc] initWithEffect:effect]; + _effectView = [[UIVisualEffectView alloc] initWithEffect:nil]; _effectView.layer.cornerRadius = 8; _effectView.layer.masksToBounds = true; [self.view.window addSubview:_effectView]; @@ -131,19 +131,17 @@ static NSString *const tips[] = { _tipLabel.textColor = [UIColor labelColor]; } _tipLabel.font = [UIFont systemFontOfSize:14]; - _tipLabel.alpha = 0.8; + _tipLabel.alpha = 0; [[NSUserDefaults standardUserDefaults] setInteger:tipIndex + 1 forKey:@"GBTipIndex"]; _tipLabel.lineBreakMode = NSLineBreakByWordWrapping; _tipLabel.numberOfLines = 3; [_effectView.contentView addSubview:_tipLabel]; [self layoutTip]; - _effectView.alpha = 1; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - [UIView animateWithDuration:0.25 animations:^{ - _effectView.alpha = 1.0; - }]; - }); + [UIView animateWithDuration:0.25 animations:^{ + _effectView.effect = effect; + _tipLabel.alpha = 0.8; + }]; } @@ -168,7 +166,8 @@ static NSString *const tips[] = { - (void)viewWillDisappear:(BOOL)animated { [UIView animateWithDuration:0.25 animations:^{ - _effectView.alpha = 0; + _effectView.effect = nil; + _tipLabel.alpha = 0; } completion:^(BOOL finished) { [_effectView removeFromSuperview]; }];
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.