mirror of https://github.com/xaoxuu/ProHUD
fix warning
This commit is contained in:
parent
a77f1a4356
commit
b2a73f1c1b
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1150"
|
LastUpgradeVersion = "1500"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
CD6537C328C35E6200A5981B /* DemoToastVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537C228C35E6200A5981B /* DemoToastVC.swift */; };
|
CD6537C328C35E6200A5981B /* DemoToastVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537C228C35E6200A5981B /* DemoToastVC.swift */; };
|
||||||
CD6537C528C35F2C00A5981B /* DemoSheetVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537C428C35F2C00A5981B /* DemoSheetVC.swift */; };
|
CD6537C528C35F2C00A5981B /* DemoSheetVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537C428C35F2C00A5981B /* DemoSheetVC.swift */; };
|
||||||
CD6AE8A32A7CC1BA0044E53D /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = CD6AE8A22A7CC1BA0044E53D /* SnapKit */; };
|
CD6AE8A32A7CC1BA0044E53D /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = CD6AE8A22A7CC1BA0044E53D /* SnapKit */; };
|
||||||
CD891BCD2A80B58E00848BBC /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = CD891BCC2A80B58E00848BBC /* SnapKit */; };
|
|
||||||
CD8EEF3B28BC5C7200E660EA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8EEF3A28BC5C7200E660EA /* AppDelegate.swift */; };
|
CD8EEF3B28BC5C7200E660EA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8EEF3A28BC5C7200E660EA /* AppDelegate.swift */; };
|
||||||
CD8EEF3D28BC5C7200E660EA /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8EEF3C28BC5C7200E660EA /* SceneDelegate.swift */; };
|
CD8EEF3D28BC5C7200E660EA /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8EEF3C28BC5C7200E660EA /* SceneDelegate.swift */; };
|
||||||
CD8EEF4228BC5C7200E660EA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD8EEF4028BC5C7200E660EA /* Main.storyboard */; };
|
CD8EEF4228BC5C7200E660EA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD8EEF4028BC5C7200E660EA /* Main.storyboard */; };
|
||||||
|
@ -50,7 +49,6 @@
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
CDCBAEC42A80D6FD00C30DE5 /* ProHUD in Frameworks */,
|
CDCBAEC42A80D6FD00C30DE5 /* ProHUD in Frameworks */,
|
||||||
CD891BCD2A80B58E00848BBC /* SnapKit in Frameworks */,
|
|
||||||
CDB6A2A228BC5F4600DEC80D /* ProHUD in Frameworks */,
|
CDB6A2A228BC5F4600DEC80D /* ProHUD in Frameworks */,
|
||||||
CD6AE8A32A7CC1BA0044E53D /* SnapKit in Frameworks */,
|
CD6AE8A32A7CC1BA0044E53D /* SnapKit in Frameworks */,
|
||||||
);
|
);
|
||||||
|
@ -123,7 +121,6 @@
|
||||||
packageProductDependencies = (
|
packageProductDependencies = (
|
||||||
CDB6A2A128BC5F4600DEC80D /* ProHUD */,
|
CDB6A2A128BC5F4600DEC80D /* ProHUD */,
|
||||||
CD6AE8A22A7CC1BA0044E53D /* SnapKit */,
|
CD6AE8A22A7CC1BA0044E53D /* SnapKit */,
|
||||||
CD891BCC2A80B58E00848BBC /* SnapKit */,
|
|
||||||
CDCBAEC32A80D6FD00C30DE5 /* ProHUD */,
|
CDCBAEC32A80D6FD00C30DE5 /* ProHUD */,
|
||||||
);
|
);
|
||||||
productName = PHDemo;
|
productName = PHDemo;
|
||||||
|
@ -138,7 +135,7 @@
|
||||||
attributes = {
|
attributes = {
|
||||||
BuildIndependentTargetsInParallel = 1;
|
BuildIndependentTargetsInParallel = 1;
|
||||||
LastSwiftUpdateCheck = 1340;
|
LastSwiftUpdateCheck = 1340;
|
||||||
LastUpgradeCheck = 1340;
|
LastUpgradeCheck = 1500;
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
CD8EEF3628BC5C7200E660EA = {
|
CD8EEF3628BC5C7200E660EA = {
|
||||||
CreatedOnToolsVersion = 13.4.1;
|
CreatedOnToolsVersion = 13.4.1;
|
||||||
|
@ -155,7 +152,6 @@
|
||||||
);
|
);
|
||||||
mainGroup = CD8EEF2E28BC5C7200E660EA;
|
mainGroup = CD8EEF2E28BC5C7200E660EA;
|
||||||
packageReferences = (
|
packageReferences = (
|
||||||
CD891BCB2A80B58E00848BBC /* XCRemoteSwiftPackageReference "SnapKit" */,
|
|
||||||
CDCBAEC22A80D6FD00C30DE5 /* XCLocalSwiftPackageReference ".." */,
|
CDCBAEC22A80D6FD00C30DE5 /* XCLocalSwiftPackageReference ".." */,
|
||||||
);
|
);
|
||||||
productRefGroup = CD8EEF3828BC5C7200E660EA /* Products */;
|
productRefGroup = CD8EEF3828BC5C7200E660EA /* Products */;
|
||||||
|
@ -224,6 +220,7 @@
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
||||||
|
@ -256,6 +253,7 @@
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
ENABLE_TESTABILITY = YES;
|
ENABLE_TESTABILITY = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
@ -284,6 +282,7 @@
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
||||||
|
@ -316,6 +315,7 @@
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
@ -422,27 +422,11 @@
|
||||||
};
|
};
|
||||||
/* End XCLocalSwiftPackageReference section */
|
/* End XCLocalSwiftPackageReference section */
|
||||||
|
|
||||||
/* Begin XCRemoteSwiftPackageReference section */
|
|
||||||
CD891BCB2A80B58E00848BBC /* XCRemoteSwiftPackageReference "SnapKit" */ = {
|
|
||||||
isa = XCRemoteSwiftPackageReference;
|
|
||||||
repositoryURL = "https://git.xaox.cc/mirrors/SnapKit.git";
|
|
||||||
requirement = {
|
|
||||||
kind = upToNextMajorVersion;
|
|
||||||
minimumVersion = 5.6.0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/* End XCRemoteSwiftPackageReference section */
|
|
||||||
|
|
||||||
/* Begin XCSwiftPackageProductDependency section */
|
/* Begin XCSwiftPackageProductDependency section */
|
||||||
CD6AE8A22A7CC1BA0044E53D /* SnapKit */ = {
|
CD6AE8A22A7CC1BA0044E53D /* SnapKit */ = {
|
||||||
isa = XCSwiftPackageProductDependency;
|
isa = XCSwiftPackageProductDependency;
|
||||||
productName = SnapKit;
|
productName = SnapKit;
|
||||||
};
|
};
|
||||||
CD891BCC2A80B58E00848BBC /* SnapKit */ = {
|
|
||||||
isa = XCSwiftPackageProductDependency;
|
|
||||||
package = CD891BCB2A80B58E00848BBC /* XCRemoteSwiftPackageReference "SnapKit" */;
|
|
||||||
productName = SnapKit;
|
|
||||||
};
|
|
||||||
CDB6A2A128BC5F4600DEC80D /* ProHUD */ = {
|
CDB6A2A128BC5F4600DEC80D /* ProHUD */ = {
|
||||||
isa = XCSwiftPackageProductDependency;
|
isa = XCSwiftPackageProductDependency;
|
||||||
productName = ProHUD;
|
productName = ProHUD;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
"identity" : "snapkit",
|
"identity" : "snapkit",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://git.xaox.cc/mirrors/SnapKit.git",
|
"location" : "https://github.com/SnapKit/SnapKit.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "f222cbdf325885926566172f6f5f06af95473158",
|
"revision" : "f222cbdf325885926566172f6f5f06af95473158",
|
||||||
"version" : "5.6.0"
|
"version" : "5.6.0"
|
||||||
|
|
|
@ -1,25 +1,14 @@
|
||||||
{
|
{
|
||||||
"object": {
|
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
{
|
||||||
"package": "Inspire",
|
"identity" : "snapkit",
|
||||||
"repositoryURL": "https://github.com/xaoxuu/Inspire.git",
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/SnapKit/SnapKit.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"branch": null,
|
|
||||||
"revision": "05bdbf23e380b7b283f9ef5c5115e1c1e1d1ad97",
|
|
||||||
"version": "2.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "SnapKit",
|
|
||||||
"repositoryURL": "https://github.com/SnapKit/SnapKit.git",
|
|
||||||
"state": {
|
|
||||||
"branch": null,
|
|
||||||
"revision" : "f222cbdf325885926566172f6f5f06af95473158",
|
"revision" : "f222cbdf325885926566172f6f5f06af95473158",
|
||||||
"version" : "5.6.0"
|
"version" : "5.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
},
|
"version" : 2
|
||||||
"version": 1
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ extension CapsuleTarget: DefaultLayout {
|
||||||
if contentStack.arrangedSubviews.contains(textLabel) == false {
|
if contentStack.arrangedSubviews.contains(textLabel) == false {
|
||||||
contentStack.addArrangedSubview(textLabel)
|
contentStack.addArrangedSubview(textLabel)
|
||||||
}
|
}
|
||||||
var text = [vm?.title ?? "", vm?.message ?? ""].filter({ $0.count > 0 }).joined(separator: " ")
|
let text = [vm?.title ?? "", vm?.message ?? ""].filter({ $0.count > 0 }).joined(separator: " ")
|
||||||
if text.count > 0 {
|
if text.count > 0 {
|
||||||
textLabel.snp.remakeConstraints { make in
|
textLabel.snp.remakeConstraints { make in
|
||||||
make.width.lessThanOrEqualTo(AppContext.appBounds.width * 0.5)
|
make.width.lessThanOrEqualTo(AppContext.appBounds.width * 0.5)
|
||||||
|
@ -113,7 +113,7 @@ extension CapsuleTarget: DefaultLayout {
|
||||||
func getWindowSize(window: CapsuleWindow) -> CGSize {
|
func getWindowSize(window: CapsuleWindow) -> CGSize {
|
||||||
let cardEdgeInsetsByDefault = config.cardEdgeInsetsByDefault
|
let cardEdgeInsetsByDefault = config.cardEdgeInsetsByDefault
|
||||||
view.layoutIfNeeded()
|
view.layoutIfNeeded()
|
||||||
var size = contentStack.frame.size
|
let size = contentStack.frame.size
|
||||||
let width = min(config.cardMaxWidthByDefault, size.width + cardEdgeInsetsByDefault.left + cardEdgeInsetsByDefault.right)
|
let width = min(config.cardMaxWidthByDefault, size.width + cardEdgeInsetsByDefault.left + cardEdgeInsetsByDefault.right)
|
||||||
let height = min(config.cardMaxHeightByDefault, size.height + cardEdgeInsetsByDefault.top + cardEdgeInsetsByDefault.bottom)
|
let height = min(config.cardMaxHeightByDefault, size.height + cardEdgeInsetsByDefault.top + cardEdgeInsetsByDefault.bottom)
|
||||||
return .init(width: max(width, config.cardMinWidth ?? 0), height: max(height, config.cardMinHeight))
|
return .init(width: max(width, config.cardMinWidth ?? 0), height: max(height, config.cardMinHeight))
|
||||||
|
|
|
@ -150,7 +150,6 @@ extension ToastTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
func getWindowSize(window: ToastWindow) -> CGSize {
|
func getWindowSize(window: ToastWindow) -> CGSize {
|
||||||
let cardEdgeInsets = config.cardEdgeInsetsByDefault
|
|
||||||
let width = CGFloat.minimum(AppContext.appBounds.width - config.marginX - config.marginX, config.cardMaxWidthByDefault)
|
let width = CGFloat.minimum(AppContext.appBounds.width - config.marginX - config.marginX, config.cardMaxWidthByDefault)
|
||||||
view.frame.size = CGSize(width: width, height: config.cardMaxHeightByDefault) // 以最大高度开始布局,然后计算实际需要高度
|
view.frame.size = CGSize(width: width, height: config.cardMaxHeightByDefault) // 以最大高度开始布局,然后计算实际需要高度
|
||||||
titleLabel.sizeToFit()
|
titleLabel.sizeToFit()
|
||||||
|
|
Loading…
Reference in New Issue