Skip to content

Commit 2e597c1

Browse files
author
rhw
committed
添加工程
1 parent b6bd2ac commit 2e597c1

File tree

746 files changed

+13208
-63
lines changed

Some content is hidden

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

746 files changed

+13208
-63
lines changed

.gitignore

+6-63
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,7 @@
1-
# Xcode
2-
#
3-
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4-
5-
## Build generated
6-
build/
7-
DerivedData/
8-
9-
## Various settings
10-
*.pbxuser
11-
!default.pbxuser
12-
*.mode1v3
13-
!default.mode1v3
14-
*.mode2v3
15-
!default.mode2v3
16-
*.perspectivev3
17-
!default.perspectivev3
18-
xcuserdata/
19-
20-
## Other
21-
*.moved-aside
22-
*.xccheckout
23-
*.xcscmblueprint
24-
25-
## Obj-C/Swift specific
26-
*.hmap
27-
*.ipa
28-
*.dSYM.zip
29-
*.dSYM
30-
31-
# CocoaPods
32-
#
33-
# We recommend against adding the Pods directory to your .gitignore. However
34-
# you should judge for yourself, the pros and cons are mentioned at:
35-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
36-
#
37-
# Pods/
38-
39-
# Carthage
40-
#
41-
# Add this line if you want to avoid checking in source code from Carthage dependencies.
42-
# Carthage/Checkouts
43-
44-
Carthage/Build
45-
46-
# fastlane
47-
#
48-
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
49-
# screenshots whenever they are needed.
50-
# For more information about the recommended setup visit:
51-
# https://docs.fastlane.tools/best-practices/source-control/#source-control
52-
53-
fastlane/report.xml
54-
fastlane/Preview.html
55-
fastlane/screenshots/**/*.png
56-
fastlane/test_output
57-
58-
# Code Injection
59-
#
60-
# After new code Injection tools there's a generated folder /iOSInjectionProject
61-
# https://github.com/johnno1962/injectionforxcode
62-
63-
iOSInjectionProject/
1+
*~
642
.DS_Store
3+
*.xcuserstate
4+
*.xcworkspace
5+
xcuserdata
6+
*.lock
7+
Pods

HeFengWeather/HeFengWeather.xcodeproj/project.pbxproj

+1,104
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1020"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "87DB8DDE224A233A00A4ACFC"
18+
BuildableName = "HeFengWeather.app"
19+
BlueprintName = "HeFengWeather"
20+
ReferencedContainer = "container:HeFengWeather.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "87DB8DF6224A233C00A4ACFC"
36+
BuildableName = "HeFengWeatherTests.xctest"
37+
BlueprintName = "HeFengWeatherTests"
38+
ReferencedContainer = "container:HeFengWeather.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
<TestableReference
42+
skipped = "NO">
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "87DB8E01224A233C00A4ACFC"
46+
BuildableName = "HeFengWeatherUITests.xctest"
47+
BlueprintName = "HeFengWeatherUITests"
48+
ReferencedContainer = "container:HeFengWeather.xcodeproj">
49+
</BuildableReference>
50+
</TestableReference>
51+
</Testables>
52+
<MacroExpansion>
53+
<BuildableReference
54+
BuildableIdentifier = "primary"
55+
BlueprintIdentifier = "87DB8DDE224A233A00A4ACFC"
56+
BuildableName = "HeFengWeather.app"
57+
BlueprintName = "HeFengWeather"
58+
ReferencedContainer = "container:HeFengWeather.xcodeproj">
59+
</BuildableReference>
60+
</MacroExpansion>
61+
<AdditionalOptions>
62+
</AdditionalOptions>
63+
</TestAction>
64+
<LaunchAction
65+
buildConfiguration = "Debug"
66+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
67+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
68+
launchStyle = "0"
69+
useCustomWorkingDirectory = "NO"
70+
ignoresPersistentStateOnLaunch = "NO"
71+
debugDocumentVersioning = "YES"
72+
debugServiceExtension = "internal"
73+
allowLocationSimulation = "YES">
74+
<BuildableProductRunnable
75+
runnableDebuggingMode = "0">
76+
<BuildableReference
77+
BuildableIdentifier = "primary"
78+
BlueprintIdentifier = "87DB8DDE224A233A00A4ACFC"
79+
BuildableName = "HeFengWeather.app"
80+
BlueprintName = "HeFengWeather"
81+
ReferencedContainer = "container:HeFengWeather.xcodeproj">
82+
</BuildableReference>
83+
</BuildableProductRunnable>
84+
<AdditionalOptions>
85+
</AdditionalOptions>
86+
</LaunchAction>
87+
<ProfileAction
88+
buildConfiguration = "Release"
89+
shouldUseLaunchSchemeArgsEnv = "YES"
90+
savedToolIdentifier = ""
91+
useCustomWorkingDirectory = "NO"
92+
debugDocumentVersioning = "YES">
93+
<BuildableProductRunnable
94+
runnableDebuggingMode = "0">
95+
<BuildableReference
96+
BuildableIdentifier = "primary"
97+
BlueprintIdentifier = "87DB8DDE224A233A00A4ACFC"
98+
BuildableName = "HeFengWeather.app"
99+
BlueprintName = "HeFengWeather"
100+
ReferencedContainer = "container:HeFengWeather.xcodeproj">
101+
</BuildableReference>
102+
</BuildableProductRunnable>
103+
</ProfileAction>
104+
<AnalyzeAction
105+
buildConfiguration = "Debug">
106+
</AnalyzeAction>
107+
<ArchiveAction
108+
buildConfiguration = "Release"
109+
revealArchiveInOrganizer = "YES">
110+
</ArchiveAction>
111+
</Scheme>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// AppDelegate.h
3+
// HeFengWeather
4+
//
5+
// Created by he on 2019/3/29.
6+
// Copyright © 2019 HeFengTianQi. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@interface AppDelegate : UIResponder <UIApplicationDelegate>
12+
13+
@property (strong, nonatomic) UIWindow *window;
14+
15+
16+
@end
17+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//
2+
// AppDelegate.m
3+
// HeFengWeather
4+
//
5+
// Created by he on 2019/3/29.
6+
// Copyright © 2019 HeFengTianQi. All rights reserved.
7+
//
8+
9+
#import "AppDelegate.h"
10+
#import "HeFengAuthorityViewController.h"
11+
12+
@interface AppDelegate ()
13+
14+
@end
15+
16+
@implementation AppDelegate
17+
18+
19+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
20+
[self initWindow];
21+
return YES;
22+
}
23+
#pragma mark 初始化rootVC
24+
-(void)initWindow{
25+
[HeFengWeatherTool initLog];
26+
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
27+
[self.window makeKeyAndVisible];
28+
[self.window setRootViewController:HeFengWeatherManager.isFirstOpenApp?[HeFengAuthorityViewController new]:[[HeFengBaseNavigationViewController alloc]initWithRootViewController:[HeFengHomeViewController new]]];
29+
}
30+
31+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// HeFengBaseButton.h
3+
// HeFengWeather
4+
//
5+
// Created by he on 2019/3/28.
6+
// Copyright © 2019 HeFengTianQi. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
NS_ASSUME_NONNULL_BEGIN
12+
13+
@interface HeFengBaseButton : UIButton
14+
@property (nonatomic,assign) CGFloat hefengFontSize;
15+
16+
@end
17+
18+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// HeFengBaseButton.m
3+
// HeFengWeather
4+
//
5+
// Created by he on 2019/3/28.
6+
// Copyright © 2019 HeFengTianQi. All rights reserved.
7+
//
8+
9+
#import "HeFengBaseButton.h"
10+
11+
@implementation HeFengBaseButton
12+
-(instancetype)initWithFrame:(CGRect)frame{
13+
self = [super initWithFrame:frame];
14+
if (self) {
15+
[[HeFengNotificationCenter rac_addObserverForName:KNotificationChangeTextSetting object:nil] subscribeNext:^(NSNotification * _Nullable x) {
16+
[self changeTextSetting];
17+
}];
18+
}
19+
return self;
20+
}
21+
- (void)setHefengFontSize:(CGFloat)hefengFontSize{
22+
_hefengFontSize = hefengFontSize;
23+
[self changeTextSetting];
24+
}
25+
26+
-(void)changeTextSetting{
27+
self.titleLabel.font = [HeFengWeatherTool getFontWithFontSize:self.hefengFontSize];
28+
}
29+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// HeFengBaseLabel.h
3+
// HeFengWeather
4+
//
5+
// Created by he on 2019/3/28.
6+
// Copyright © 2019 HeFengTianQi. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
NS_ASSUME_NONNULL_BEGIN
12+
13+
@interface HeFengBaseLabel : UILabel
14+
/**
15+
字体大小
16+
*/
17+
@property (nonatomic,assign) CGFloat hefengFontSize;
18+
/**
19+
多语言
20+
*/
21+
@property (nonatomic,copy) NSString *hefengLocalString;
22+
/**
23+
单位
24+
*/
25+
@property (nonatomic,copy) NSString *hefengTempString;
26+
27+
@end
28+
29+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
//
2+
// HeFengBaseLabel.m
3+
// HeFengWeather
4+
//
5+
// Created by he on 2019/3/28.
6+
// Copyright © 2019 HeFengTianQi. All rights reserved.
7+
//
8+
9+
#import "HeFengBaseLabel.h"
10+
11+
@implementation HeFengBaseLabel
12+
13+
-(instancetype)initWithFrame:(CGRect)frame{
14+
self = [super initWithFrame:frame];
15+
if (self) {
16+
[[HeFengNotificationCenter rac_addObserverForName:KNotificationChangeTextSetting object:nil] subscribeNext:^(NSNotification * _Nullable x) {
17+
[self changeTextSetting];
18+
}];
19+
}
20+
return self;
21+
}
22+
-(void)setHefengTempString:(NSString *)hefengTempString{
23+
_hefengTempString = hefengTempString;
24+
[self changeTextSetting];
25+
}
26+
-(void)setHefengLocalString:(NSString *)hefengLocalString{
27+
_hefengLocalString = hefengLocalString;
28+
[self changeTextSetting];
29+
}
30+
- (void)setHefengFontSize:(CGFloat)hefengFontSize{
31+
_hefengFontSize = hefengFontSize;
32+
[self changeTextSetting];
33+
}
34+
35+
-(void)changeTextSetting{
36+
self.font = [HeFengWeatherTool getFontWithFontSize:self.hefengFontSize];
37+
if (self.hefengLocalString) {
38+
self.text = HeFengLocal(self.hefengLocalString);
39+
}
40+
if (self.hefengTempString) {
41+
self.text = [HeFengWeatherTool getTempStringWithString:self.hefengTempString isHaveUnit:YES];
42+
}
43+
}
44+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// HeFengBaseModel.h
3+
// HeFengWeather
4+
//
5+
// Created by he on 2019/3/29.
6+
// Copyright © 2019 HeFengTianQi. All rights reserved.
7+
//
8+
// When I wrote this, only God and I understood what I was doing
9+
// Now, God only knows
10+
11+
#import <Foundation/Foundation.h>
12+
13+
NS_ASSUME_NONNULL_BEGIN
14+
15+
@interface HeFengBaseModel : NSObject<NSCoding, NSCopying>
16+
17+
@end
18+
19+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// HeFengBaseModel.m
3+
// HeFengWeather
4+
//
5+
// Created by he on 2019/3/29.
6+
// Copyright © 2019 HeFengTianQi. All rights reserved.
7+
//
8+
// When I wrote this, only God and I understood what I was doing
9+
// Now, God only knows
10+
11+
#import "HeFengBaseModel.h"
12+
13+
@implementation HeFengBaseModel
14+
- (void)encodeWithCoder:(NSCoder *)aCoder { [self yy_modelEncodeWithCoder:aCoder]; }
15+
- (id)initWithCoder:(NSCoder *)aDecoder { self = [super init]; return [self yy_modelInitWithCoder:aDecoder]; }
16+
- (id)copyWithZone:(NSZone *)zone { return [self yy_modelCopy]; }
17+
- (NSUInteger)hash { return [self yy_modelHash]; }
18+
- (BOOL)isEqual:(id)object { return [self yy_modelIsEqual:object]; }
19+
- (NSString *)description { return [self yy_modelDescription]; }
20+
@end

0 commit comments

Comments
 (0)