Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cebb6eb

Browse files
V2.0.0提交
1. 新增MLeaksFinder,检查内存泄漏 2. 清掉Podfile目前没用到的第三方框架 3. 新增MVC设计模式的使用场景
1 parent 6f2d51b commit cebb6eb

File tree

181 files changed

+5898
-516
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+5898
-516
lines changed

‎.DS_Store

6 KB
Binary file not shown.

‎MHDevelopExample/.DS_Store

6 KB
Binary file not shown.

‎MHDevelopExample/MHDevelopExample.xcodeproj/project.pbxproj

Lines changed: 712 additions & 76 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
6 KB
Binary file not shown.

‎MHDevelopExample/MHDevelopExample/AppDelegate.m

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,12 @@
99
#import "AppDelegate.h"
1010
#import "MHNavigationController.h"
1111
#import "MHExampleController.h"
12-
12+
#import"CMHHomePageViewController.h"
1313

1414
#if defined(DEBUG)||defined(_DEBUG)
1515
#import "JPFPSStatus.h"
16-
#import <FBMemoryProfiler/FBMemoryProfiler.h>
17-
#import <FBRetainCycleDetector/FBRetainCycleDetector.h>
18-
#import "CacheCleanerPlugin.h"
19-
#import "RetainCycleLoggerPlugin.h"
2016
#endif
2117

22-
2318
@interface AppDelegate ()
2419
/**
2520
* 用户数据 只读
@@ -30,11 +25,6 @@ @interface AppDelegate ()
3025
@end
3126

3227
@implementation AppDelegate
33-
{
34-
#if defined(DEBUG)||defined(_DEBUG)
35-
FBMemoryProfiler *memoryProfiler;
36-
#endif
37-
}
3828

3929
#pragma mark- 获取appdelegate
4030
+ (AppDelegate *)sharedDelegate
@@ -55,38 +45,52 @@ - (MHAccount *)account
5545

5646
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
5747

58-
// 设置状态栏不隐藏
59-
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
48+
/// 初始化UI之前配置
49+
[self _configureApplication:application initialParamsBeforeInitUI:launchOptions];
50+
6051

6152
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
6253
self.window.backgroundColor = [UIColor whiteColor];
54+
55+
#if CMHDEBUG
56+
self.window.rootViewController = [[CMHHomePageViewController alloc] initWithParams:nil];
57+
#else
6358
self.window.rootViewController = [[MHNavigationController alloc] initWithRootViewController:[[MHExampleController alloc] init]];
59+
#endif
60+
61+
6462
[self.window makeKeyAndVisible];
6563

6664
#if defined(DEBUG)||defined(_DEBUG)
67-
[self _configDebugModelTools];
65+
// [self _configDebugModelTools];
6866
#endif
6967

7068
return YES;
7169
}
7270

7371

72+
#pragma mark - 在初始化UI之前配置
73+
- (void)_configureApplication:(UIApplication *)application initialParamsBeforeInitUI:(NSDictionary *)launchOptions{
74+
/// 显示状态栏
75+
[application setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
76+
77+
/// 配置键盘
78+
[self _configureKeyboardManager];
79+
}
80+
81+
/// 配置键盘管理器
82+
- (void)_configureKeyboardManager {
83+
IQKeyboardManager.sharedManager.enable = YES;
84+
IQKeyboardManager.sharedManager.enableAutoToolbar = NO;
85+
IQKeyboardManager.sharedManager.shouldResignOnTouchOutside = YES;
86+
}
87+
88+
7489
#pragma mark - 调试(DEBUG)模式
75-
- (void)_configDebugModelTools
76-
{
90+
- (void)_configDebugModelTools{
7791
/// 显示FPS
7892
[[JPFPSStatus sharedInstance] open];
7993

80-
/// 内存分析+通过Runtime监测循环引用+跟踪oc对象的分配情况
81-
NSArray *filters = @[FBFilterBlockWithObjectIvarRelation([UIView class], @"_subviewCache"),
82-
FBFilterBlockWithObjectIvarRelation([UIPanGestureRecognizer class], @"_internalActiveTouches")];
83-
FBObjectGraphConfiguration *configuration =
84-
[[FBObjectGraphConfiguration alloc] initWithFilterBlocks:filters
85-
shouldInspectTimers:NO];
86-
memoryProfiler = [[FBMemoryProfiler alloc] initWithPlugins:@[[CacheCleanerPlugin new],
87-
[RetainCycleLoggerPlugin new]]
88-
retainCycleDetectorConfiguration:configuration];
89-
[memoryProfiler enable];
9094
}
9195

9296

Binary file not shown.
Binary file not shown.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// CMHObject.h
3+
// MHDevelopExample
4+
//
5+
// Created by lx on 2018年6月2日.
6+
// Copyright © 2018年 CoderMikeHe. All rights reserved.
7+
// 基类
8+
9+
#import <Foundation/Foundation.h>
10+
11+
@interface CMHObject : NSObject
12+
13+
@end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// CMHObject.m
3+
// MHDevelopExample
4+
//
5+
// Created by lx on 2018年6月2日.
6+
// Copyright © 2018年 CoderMikeHe. All rights reserved.
7+
//
8+
9+
#import "CMHObject.h"
10+
11+
@implementation CMHObject
12+
13+
@end

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /