Skip to content

Commit b1934b4

Browse files
macmac
mac
authored and
mac
committed
已上传cocoa pods
已上传cocoa pods
1 parent ee259e1 commit b1934b4

Some content is hidden

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

42 files changed

+28800
-0
lines changed

Diff for: Foundation+Log.m

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
#import <Foundation/Foundation.h>
3+
4+
@implementation NSDictionary (Log)
5+
/**
6+
* 系统会自动调用
7+
*/
8+
- (NSString *)descriptionWithLocale:(id)locale
9+
{
10+
NSMutableString *str = [NSMutableString string];
11+
12+
[str appendString:@"{\n"];
13+
14+
// 遍历字典的所有键值对
15+
[self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
16+
[str appendFormat:@"\t%@ = %@,\n", key, obj];
17+
}];
18+
19+
[str appendString:@"}"];
20+
21+
// 查出最后一个,的范围
22+
NSRange range = [str rangeOfString:@"," options:NSBackwardsSearch];
23+
// 删掉最后一个,
24+
[str deleteCharactersInRange:range];
25+
26+
return str;
27+
}
28+
@end
29+
30+
@implementation NSArray (Log)
31+
/**
32+
* 系统会自动调用
33+
*/
34+
- (NSString *)descriptionWithLocale:(id)locale
35+
{
36+
NSMutableString *str = [NSMutableString string];
37+
38+
[str appendString:@"[\n"];
39+
40+
// 遍历数组的所有元素
41+
[self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
42+
[str appendFormat:@"%@,\n", obj];
43+
}];
44+
45+
[str appendString:@"]"];
46+
47+
// 查出最后一个,的范围
48+
NSRange range = [str rangeOfString:@"," options:NSBackwardsSearch];
49+
// 删掉最后一个,
50+
[str deleteCharactersInRange:range];
51+
52+
return str;
53+
}
54+
@end

Diff for: YMCitySelect.podspec

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Pod::Spec.new do |s|
2+
s.name = 'YMCitySelect'
3+
s.version = '1.0.2'
4+
s.summary = 'One line of code do city choice'
5+
s.homepage = 'https://github.com/iosdeveloperSVIP/YMCitySelect'
6+
s.license = 'MIT'
7+
s.authors = {'zhaoyimin' => '[email protected]'}
8+
s.platform = :ios, '8.0'
9+
s.source = {:git => 'https://github.com/iosdeveloperSVIP/YMCitySelect.git', :tag => s.version}
10+
s.source_files = 'YMCitySelect/*.{h,m}'
11+
s.resource = 'YMCitySelect/YMCitySelect.bundle'
12+
s.requires_arc = true
13+
end

Diff for: YMCitySelect.xcodeproj/project.pbxproj

+355
Large diffs are not rendered by default.

Diff for: YMCitySelect.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
type = "1"
4+
version = "2.0">
5+
<Breakpoints>
6+
<BreakpointProxy
7+
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
8+
<BreakpointContent
9+
shouldBeEnabled = "Yes"
10+
ignoreCount = "0"
11+
continueAfterRunningActions = "No"
12+
scope = "0"
13+
stopOnStyle = "0">
14+
</BreakpointContent>
15+
</BreakpointProxy>
16+
</Breakpoints>
17+
</Bucket>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0730"
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 = "047FC5AB1CCB690D0062A943"
18+
BuildableName = "YMCitySelect.app"
19+
BlueprintName = "YMCitySelect"
20+
ReferencedContainer = "container:YMCitySelect.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+
</Testables>
32+
<MacroExpansion>
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "047FC5AB1CCB690D0062A943"
36+
BuildableName = "YMCitySelect.app"
37+
BlueprintName = "YMCitySelect"
38+
ReferencedContainer = "container:YMCitySelect.xcodeproj">
39+
</BuildableReference>
40+
</MacroExpansion>
41+
<AdditionalOptions>
42+
</AdditionalOptions>
43+
</TestAction>
44+
<LaunchAction
45+
buildConfiguration = "Debug"
46+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
47+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
48+
launchStyle = "0"
49+
useCustomWorkingDirectory = "NO"
50+
ignoresPersistentStateOnLaunch = "NO"
51+
debugDocumentVersioning = "YES"
52+
debugServiceExtension = "internal"
53+
allowLocationSimulation = "YES">
54+
<BuildableProductRunnable
55+
runnableDebuggingMode = "0">
56+
<BuildableReference
57+
BuildableIdentifier = "primary"
58+
BlueprintIdentifier = "047FC5AB1CCB690D0062A943"
59+
BuildableName = "YMCitySelect.app"
60+
BlueprintName = "YMCitySelect"
61+
ReferencedContainer = "container:YMCitySelect.xcodeproj">
62+
</BuildableReference>
63+
</BuildableProductRunnable>
64+
<AdditionalOptions>
65+
</AdditionalOptions>
66+
</LaunchAction>
67+
<ProfileAction
68+
buildConfiguration = "Release"
69+
shouldUseLaunchSchemeArgsEnv = "YES"
70+
savedToolIdentifier = ""
71+
useCustomWorkingDirectory = "NO"
72+
debugDocumentVersioning = "YES">
73+
<BuildableProductRunnable
74+
runnableDebuggingMode = "0">
75+
<BuildableReference
76+
BuildableIdentifier = "primary"
77+
BlueprintIdentifier = "047FC5AB1CCB690D0062A943"
78+
BuildableName = "YMCitySelect.app"
79+
BlueprintName = "YMCitySelect"
80+
ReferencedContainer = "container:YMCitySelect.xcodeproj">
81+
</BuildableReference>
82+
</BuildableProductRunnable>
83+
</ProfileAction>
84+
<AnalyzeAction
85+
buildConfiguration = "Debug">
86+
</AnalyzeAction>
87+
<ArchiveAction
88+
buildConfiguration = "Release"
89+
revealArchiveInOrganizer = "YES">
90+
</ArchiveAction>
91+
</Scheme>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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>SchemeUserState</key>
6+
<dict>
7+
<key>YMCitySelect.xcscheme</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
<key>SuppressBuildableAutocreation</key>
14+
<dict>
15+
<key>047FC5AB1CCB690D0062A943</key>
16+
<dict>
17+
<key>primary</key>
18+
<true/>
19+
</dict>
20+
</dict>
21+
</dict>
22+
</plist>

Diff for: YMCitySelect/UIView+ym_extension.h

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//代码地址:https://github.com/iosdeveloperSVIP/YMCitySelect
2+
//原创:iosdeveloper赵依民
3+
4+
//
5+
// UIView+ym_extension.h
6+
// YMChannelSwitching
7+
//
8+
// Created by mac on 16/4/20.
9+
// Copyright © 2016年 YiMin. All rights reserved.
10+
//
11+
12+
#import <UIKit/UIKit.h>
13+
14+
@interface UIView (ym_extension)
15+
16+
@property (nonatomic, assign) CGFloat ym_x;
17+
@property (nonatomic, assign) CGFloat ym_y;
18+
@property (nonatomic, assign) CGFloat ym_centerX;
19+
@property (nonatomic, assign) CGFloat ym_centerY;
20+
@property (nonatomic, assign) CGFloat ym_width;
21+
@property (nonatomic, assign) CGFloat ym_height;
22+
@property (nonatomic, assign) CGSize ym_size;
23+
24+
@end

Diff for: YMCitySelect/UIView+ym_extension.m

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
//代码地址:https://github.com/iosdeveloperSVIP/YMCitySelect
2+
//原创:iosdeveloper赵依民
3+
4+
//
5+
// UIView+ym_extension.m
6+
// YMChannelSwitching
7+
//
8+
// Created by mac on 16/4/20.
9+
// Copyright © 2016年 YiMin. All rights reserved.
10+
//
11+
12+
#import "UIView+ym_extension.h"
13+
14+
@implementation UIView (ym_extension)
15+
16+
-(void)setYm_x:(CGFloat)ym_x
17+
{
18+
CGRect frame = self.frame;
19+
frame.origin.x = ym_x;
20+
self.frame = frame;
21+
}
22+
23+
-(CGFloat)ym_x
24+
{
25+
return self.frame.origin.x;
26+
}
27+
28+
-(void)setYm_y:(CGFloat)ym_y
29+
{
30+
CGRect frame = self.frame;
31+
frame.origin.y = ym_y;
32+
self.frame = frame;
33+
}
34+
35+
-(CGFloat)ym_y
36+
{
37+
return self.frame.origin.y;
38+
}
39+
40+
-(void)setYm_width:(CGFloat)ym_width{
41+
CGRect frame = self.frame;
42+
frame.size.width = ym_width;
43+
self.frame = frame;
44+
}
45+
46+
-(CGFloat)ym_width
47+
{
48+
return self.frame.size.width;
49+
}
50+
51+
-(void)setYm_height:(CGFloat)ym_height
52+
{
53+
CGRect frame = self.frame;
54+
frame.size.height = ym_height;
55+
self.frame = frame;
56+
}
57+
58+
-(CGFloat)ym_height
59+
{
60+
return self.frame.size.height;
61+
}
62+
63+
-(void)setYm_centerX:(CGFloat)ym_centerX
64+
{
65+
CGPoint tempP =self.center;
66+
tempP.x = ym_centerX;
67+
self.center = tempP;
68+
}
69+
70+
-(CGFloat)ym_centerX
71+
{
72+
return self.center.x;
73+
}
74+
75+
-(void)setYm_centerY:(CGFloat)ym_centerY
76+
{
77+
CGPoint tempP = self.center;
78+
tempP.y = ym_centerY;
79+
self.center = tempP;
80+
}
81+
82+
-(CGFloat)ym_centerY
83+
{
84+
return self.center.y;
85+
}
86+
87+
-(void)setYm_size:(CGSize)ym_size
88+
{
89+
CGRect frame = self.frame;
90+
frame.size = ym_size;
91+
self.frame = frame;
92+
}
93+
94+
-(CGSize)ym_size
95+
{
96+
return self.frame.size;
97+
}
98+
99+
100+
101+
@end

Diff for: YMCitySelect/YMCityGroupsModel.h

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//代码地址:https://github.com/iosdeveloperSVIP/YMCitySelect
2+
//原创:iosdeveloper赵依民
3+
4+
//
5+
// YMCityGroupsModel.h
6+
// YMCitySelect
7+
//
8+
// Created by mac on 16/4/24.
9+
// Copyright © 2016年 YiMin. All rights reserved.
10+
//
11+
12+
#import <Foundation/Foundation.h>
13+
14+
@interface YMCityGroupsModel : NSObject
15+
16+
/** 城市数组*/
17+
@property (nonatomic, strong) NSArray *cities;
18+
19+
/** 分类标题*/
20+
@property (nonatomic, copy) NSString *title;
21+
22+
@end

Diff for: YMCitySelect/YMCityGroupsModel.m

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//代码地址:https://github.com/iosdeveloperSVIP/YMCitySelect
2+
//原创:iosdeveloper赵依民
3+
4+
//
5+
// YMCityGroupsModel.m
6+
// YMCitySelect
7+
//
8+
// Created by mac on 16/4/24.
9+
// Copyright © 2016年 YiMin. All rights reserved.
10+
//
11+
12+
#import "YMCityGroupsModel.h"
13+
14+
@implementation YMCityGroupsModel
15+
16+
@end

0 commit comments

Comments
 (0)