chore: Initial clean commit

- Removed YuMi/Library/ (138 MB, not tracked)
- Removed YuMi/Resources/ (23 MB, not tracked)
- Removed old version assets (566 files, not tracked)
- Excluded Pods/, xcuserdata/ and other build artifacts
- Clean repository optimized for company server deployment
This commit is contained in:
edwinQQQ
2025-10-09 16:19:14 +08:00
commit a35a711be6
5582 changed files with 408913 additions and 0 deletions

View File

@@ -0,0 +1,91 @@
//
// BaseNavigationController.m
// YUMI
//
// Created by zu on 2021/9/7.
//
#import "BaseNavigationController.h"
///Tool
#import "DJDKMIMOMColor.h"
@interface BaseNavigationController ()<UIGestureRecognizerDelegate>
@end
@implementation BaseNavigationController
-(void)dealloc{
[[NSNotificationCenter defaultCenter]removeObserver:self];
}
- (void)viewDidLoad {
[super viewDidLoad];
if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.interactivePopGestureRecognizer.delegate = self;
}
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(switchLanguage) name:@"kNavViewUpdateWhenLanguageUpdate" object:nil];
[self themeConfig];
if(isMSRTL()){
self.navigationBar.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;;
self.view.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
}else{
self.navigationBar.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;;
self.view.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
}
}
-(void)switchLanguage{
if(isMSRTL()){
self.navigationBar.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
self.view.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
}else{
self.navigationBar.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
self.view.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
}
}
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
if(self.topViewController == viewController) return;
if (self.childViewControllers.count > 0) {
viewController.hidesBottomBarWhenPushed = YES;
UIBarButtonItem *leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"common_nav_back"]ms_SetImageForRTL] style:UIBarButtonItemStyleDone target:self action:@selector(backClick)];
leftBarButtonItem.tintColor = [DJDKMIMOMColor mainTextColor];
viewController.navigationItem.leftBarButtonItem = leftBarButtonItem;
}
viewController.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
[super pushViewController:viewController animated:animated];
}
- (void)backClick{
[self popViewControllerAnimated:YES];
}
- (void)themeConfig {
self.navigationBar.shadowImage = [[UIImage alloc] init];
self.navigationBar.barTintColor = [DJDKMIMOMColor appBackgroundColor];
self.navigationBar.tintColor = [UIColor whiteColor];
self.navigationBar.translucent = NO;
self.view.backgroundColor = [DJDKMIMOMColor appBackgroundColor];
[self.navigationBar setTitleTextAttributes:@{
NSFontAttributeName:[UIFont systemFontOfSize:18 weight:UIFontWeightMedium],
NSForegroundColorAttributeName:[DJDKMIMOMColor mainTextColor]
}];
/// scrollEdgeAppearance iOS15 nil 使 standardAppearance使 @fengshuo
if (@available(iOS 15.0, *)) {
UINavigationBarAppearance *appearance = [UINavigationBarAppearance new];
appearance.titleTextAttributes = @{NSFontAttributeName:[UIFont systemFontOfSize:18 weight:UIFontWeightMedium],
NSForegroundColorAttributeName:[DJDKMIMOMColor mainTextColor]};
appearance.backgroundColor = [DJDKMIMOMColor appCellBackgroundColor];
self.navigationBar.standardAppearance = appearance;
self.navigationBar.scrollEdgeAppearance = appearance;
}
}
#pragma mark - UIGestureRecognizerDelegate
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
return YES;
}
@end