-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6368c5b
commit 2a5873d
Showing
12 changed files
with
140 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
platform :ios, "12.0" | ||
use_frameworks! :linkage => :static | ||
|
||
source "https://github.com/CocoaPods/Specs.git" | ||
|
||
def pod_Common | ||
pod "JSCoreKit", :path => ".." | ||
end | ||
|
||
target "JSCoreKitExample" do | ||
pod_Common | ||
pod "LookinServer", "~> 1.0.4", :configurations => ["Debug"] | ||
pod "MLeaksFinder", :configurations => ["Debug"] | ||
pod "FBRetainCycleDetector", :git => "https://github.com/jiasongs/FBRetainCycleDetector.git", :configurations => ["Debug"] | ||
pod "LookinServer", :configurations => ["Debug"] | ||
pod "MLeaksFinder", :git => "https://github.com/Tencent/MLeaksFinder.git", :configurations => ["Debug"] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "JSCoreKit" | ||
s.version = "0.2.8" | ||
s.version = "0.2.9" | ||
s.summary = "JSCoreKit" | ||
s.homepage = "https://github.com/jiasongs/JSCoreKit" | ||
s.author = { "jiasong" => "[email protected]" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// JSCoreHelper+LayoutGuide.h | ||
// JSCoreKit | ||
// | ||
// Created by jiasong on 2024/10/16. | ||
// | ||
|
||
#import "JSCoreHelper.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface JSCoreHelper (LayoutGuide) | ||
|
||
@property (class, nonatomic, readonly) CGFloat displayScale; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// JSCoreHelper+LayoutGuide.m | ||
// JSCoreKit | ||
// | ||
// Created by jiasong on 2024/10/16. | ||
// | ||
|
||
#import "JSCoreHelper+LayoutGuide.h" | ||
|
||
@implementation JSCoreHelper (LayoutGuide) | ||
|
||
+ (CGFloat)displayScale { | ||
if (@available(iOS 13.0, *)) { | ||
NSAssert(UITraitCollection.currentTraitCollection.displayScale >= 1, @""); | ||
CGFloat displayScale = UITraitCollection.currentTraitCollection.displayScale ? : UIScreen.mainScreen.scale; | ||
return MAX(displayScale, 1); | ||
} else { | ||
return MAX(UIScreen.mainScreen.scale, 1); | ||
} | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters