Skip to content

Commit

Permalink
替换首页为PageController实现,替换MBProgressHUD为LYBProgressHUD,修复第一次点击右键没反应
Browse files Browse the repository at this point in the history
  • Loading branch information
liyb93 committed Jan 14, 2021
1 parent bec9c8d commit 9b2956b
Show file tree
Hide file tree
Showing 20 changed files with 374 additions and 3,142 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,7 @@
# 其他

最后喜欢的可以点颗小心心支持一下,非常感谢!
最后喜欢的可以点颗⭐支持一下,非常感谢!

最后,这是第一次写完一个完整MacOS的工程,对MacOS开发还有很多不懂的地方,工程中可能还存在很多未修复bug,如果发现bug,可以在Issues中提问,也可以自行修改。

1 change: 1 addition & 0 deletions iSWaller/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ target 'iSWaller' do
pod 'HandyJSON'
pod 'FMDB'
pod 'MASShortcut'
pod 'LYBProgressHUD'

# Pods for iSWaller

Expand Down
6 changes: 5 additions & 1 deletion iSWaller/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ PODS:
- Kingfisher (5.14.0):
- Kingfisher/Core (= 5.14.0)
- Kingfisher/Core (5.14.0)
- LYBProgressHUD (1.0.0)
- MASShortcut (2.4.0)
- SnapKit (5.0.1)

Expand All @@ -15,6 +16,7 @@ DEPENDENCIES:
- FMDB
- HandyJSON
- Kingfisher
- LYBProgressHUD
- MASShortcut
- SnapKit

Expand All @@ -24,6 +26,7 @@ SPEC REPOS:
- FMDB
- HandyJSON
- Kingfisher
- LYBProgressHUD
- MASShortcut
- SnapKit

Expand All @@ -32,9 +35,10 @@ SPEC CHECKSUMS:
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
HandyJSON: d45b8415c501e3affc59ca9762c1197ff0feb646
Kingfisher: 7b64389a43139c903ec434788344c288217c792d
LYBProgressHUD: b394e7e5629a0d18baf0b03fa7e9f19c0465b838
MASShortcut: d9e4909e878661cc42877cc9d6efbe638273ab57
SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb

PODFILE CHECKSUM: bccb52b733f384fbd86597194805ca863a98413a
PODFILE CHECKSUM: addf314cd7d2a679fcfc15a086c910ee70888282

COCOAPODS: 1.9.1
36 changes: 18 additions & 18 deletions iSWaller/iSWaller.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
objects = {

/* Begin PBXBuildFile section */
EA01237425B00E8C001B8564 /* iSImageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA01237225B00E8C001B8564 /* iSImageController.swift */; };
EA01237525B00E8C001B8564 /* iSImageController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EA01237325B00E8C001B8564 /* iSImageController.xib */; };
EA01237A25B00FD0001B8564 /* iSPageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA01237825B00FD0001B8564 /* iSPageController.swift */; };
EA01237B25B00FD0001B8564 /* iSPageController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EA01237925B00FD0001B8564 /* iSPageController.xib */; };
EA084B8C24AB16F400BAD17E /* iSGalleryController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA084B8A24AB16F400BAD17E /* iSGalleryController.swift */; };
EA084B8D24AB16F400BAD17E /* iSGalleryController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EA084B8B24AB16F400BAD17E /* iSGalleryController.xib */; };
EA084BBE24AB308D00BAD17E /* iSDownloadController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA084BBC24AB308D00BAD17E /* iSDownloadController.swift */; };
Expand Down Expand Up @@ -45,7 +49,6 @@
EA60E89D24AF21BC00AACC7C /* String+iSWaller.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA60E89C24AF21BC00AACC7C /* String+iSWaller.swift */; };
EA60E89F24AF21F400AACC7C /* iSCacheHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA60E89E24AF21F400AACC7C /* iSCacheHelper.swift */; };
EA60E8A124AF345E00AACC7C /* NSImage+iSWaller.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA60E8A024AF345E00AACC7C /* NSImage+iSWaller.swift */; };
EA9BB7A524C6E54D0026C048 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = EA9BB7A324C6E54D0026C048 /* MBProgressHUD.m */; };
EAAB51AB24AC32A4003710F0 /* iSNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAAB51AA24AC32A4003710F0 /* iSNavigationBar.swift */; };
EAAB51AD24AC3B68003710F0 /* NSControl+iSWaller.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAAB51AC24AC3B68003710F0 /* NSControl+iSWaller.swift */; };
EAAB51AF24AC510B003710F0 /* NSButton+iSWaller.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAAB51AE24AC510B003710F0 /* NSButton+iSWaller.swift */; };
Expand Down Expand Up @@ -141,6 +144,10 @@
/* Begin PBXFileReference section */
0D839D2002310B1047742043 /* Pods_iSWaller.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iSWaller.framework; sourceTree = BUILT_PRODUCTS_DIR; };
74342A918FC8919F6D6DA664 /* Pods-iSWaller.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iSWaller.release.xcconfig"; path = "Target Support Files/Pods-iSWaller/Pods-iSWaller.release.xcconfig"; sourceTree = "<group>"; };
EA01237225B00E8C001B8564 /* iSImageController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iSImageController.swift; sourceTree = "<group>"; };
EA01237325B00E8C001B8564 /* iSImageController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = iSImageController.xib; sourceTree = "<group>"; };
EA01237825B00FD0001B8564 /* iSPageController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iSPageController.swift; sourceTree = "<group>"; };
EA01237925B00FD0001B8564 /* iSPageController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = iSPageController.xib; sourceTree = "<group>"; };
EA084B8A24AB16F400BAD17E /* iSGalleryController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iSGalleryController.swift; sourceTree = "<group>"; };
EA084B8B24AB16F400BAD17E /* iSGalleryController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = iSGalleryController.xib; sourceTree = "<group>"; };
EA084BBC24AB308D00BAD17E /* iSDownloadController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iSDownloadController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -182,8 +189,6 @@
EA60E89C24AF21BC00AACC7C /* String+iSWaller.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+iSWaller.swift"; sourceTree = "<group>"; };
EA60E89E24AF21F400AACC7C /* iSCacheHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = iSCacheHelper.swift; sourceTree = "<group>"; };
EA60E8A024AF345E00AACC7C /* NSImage+iSWaller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSImage+iSWaller.swift"; sourceTree = "<group>"; };
EA9BB7A324C6E54D0026C048 /* MBProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = "<group>"; };
EA9BB7A424C6E54D0026C048 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = "<group>"; };
EAAB51AA24AC32A4003710F0 /* iSNavigationBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iSNavigationBar.swift; sourceTree = "<group>"; };
EAAB51AC24AC3B68003710F0 /* NSControl+iSWaller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSControl+iSWaller.swift"; sourceTree = "<group>"; };
EAAB51AE24AC510B003710F0 /* NSButton+iSWaller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSButton+iSWaller.swift"; sourceTree = "<group>"; };
Expand All @@ -206,7 +211,6 @@
EAC7C71524B218D8003C9BB5 /* iSWallerHelper.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = iSWallerHelper.entitlements; sourceTree = "<group>"; };
EACDA0482501E36600C1C489 /* iSCategoryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iSCategoryView.swift; sourceTree = "<group>"; };
EACDA04A2502152800C1C489 /* Dictionary+iSWaller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Dictionary+iSWaller.swift"; sourceTree = "<group>"; };
EAD51CDD24AF800200ADD22B /* iSWaller-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iSWaller-Bridging-Header.h"; sourceTree = "<group>"; };
EAD51CE124AF83B500ADD22B /* iSHUDManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iSHUDManager.swift; sourceTree = "<group>"; };
EAE0838F24B6DCC1009910F9 /* iSDownloadSelectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iSDownloadSelectView.swift; sourceTree = "<group>"; };
EAE100D4250A3FF300DBBD67 /* iSColorItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iSColorItem.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -259,6 +263,10 @@
children = (
EA084B8A24AB16F400BAD17E /* iSGalleryController.swift */,
EA084B8B24AB16F400BAD17E /* iSGalleryController.xib */,
EA01237225B00E8C001B8564 /* iSImageController.swift */,
EA01237325B00E8C001B8564 /* iSImageController.xib */,
EA01237825B00FD0001B8564 /* iSPageController.swift */,
EA01237925B00FD0001B8564 /* iSPageController.xib */,
);
path = Controller;
sourceTree = "<group>";
Expand Down Expand Up @@ -456,7 +464,6 @@
EA15AE25248E48A200191A5B /* SupportingFiles */ = {
isa = PBXGroup;
children = (
EAD51CDD24AF800200ADD22B /* iSWaller-Bridging-Header.h */,
EA15AE19248E489800191A5B /* Assets.xcassets */,
EA15AE1B248E489800191A5B /* Main.storyboard */,
EA15AE1E248E489800191A5B /* Info.plist */,
Expand Down Expand Up @@ -558,15 +565,6 @@
path = Network;
sourceTree = "<group>";
};
EA9BB7A224C6E54D0026C048 /* MBProgressHUD */ = {
isa = PBXGroup;
children = (
EA9BB7A324C6E54D0026C048 /* MBProgressHUD.m */,
EA9BB7A424C6E54D0026C048 /* MBProgressHUD.h */,
);
path = MBProgressHUD;
sourceTree = "<group>";
};
EAAB51B524AC61E8003710F0 /* Base */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -626,7 +624,6 @@
EAD51CDC24AF7FF800ADD22B /* Vendor */ = {
isa = PBXGroup;
children = (
EA9BB7A224C6E54D0026C048 /* MBProgressHUD */,
);
path = Vendor;
sourceTree = "<group>";
Expand Down Expand Up @@ -733,6 +730,7 @@
buildActionMask = 2147483647;
files = (
EA084BCF24AB3BE700BAD17E /* iSSettingController.xib in Resources */,
EA01237525B00E8C001B8564 /* iSImageController.xib in Resources */,
EA2F527C24BEC66D007EEC45 /* iSSettingSelectedItem.xib in Resources */,
EA2F528024BEC682007EEC45 /* iSSettingChooseItem.xib in Resources */,
EA15AE1A248E489800191A5B /* Assets.xcassets in Resources */,
Expand All @@ -747,6 +745,7 @@
EA2F528824BEC6C1007EEC45 /* iSSettingConfigItem.xib in Resources */,
EA2F528424BEC69F007EEC45 /* iSSettingChangeItem.xib in Resources */,
EA2F528C24BEC6D2007EEC45 /* iSSettingActionItem.xib in Resources */,
EA01237B25B00FD0001B8564 /* iSPageController.xib in Resources */,
EA084BBF24AB308D00BAD17E /* iSDownloadController.xib in Resources */,
EA084BDB24AB3C1800BAD17E /* iSSearchController.xib in Resources */,
EAC1603F2514B84B00C47E57 /* iSColorController.xib in Resources */,
Expand Down Expand Up @@ -837,7 +836,8 @@
EAAB51B124AC52B5003710F0 /* NSColor+iSWaller.swift in Sources */,
EA60E88724AEDF3A00AACC7C /* iSGalleryModel.swift in Sources */,
EA0AF85924B5C72B0056EDE6 /* Date+iSWaller.swift in Sources */,
EA9BB7A524C6E54D0026C048 /* MBProgressHUD.m in Sources */,
EA01237425B00E8C001B8564 /* iSImageController.swift in Sources */,
EA01237A25B00FD0001B8564 /* iSPageController.swift in Sources */,
EAC7C6DF24B051A0003C9BB5 /* iSDownloadItem.swift in Sources */,
EA084BE224AB3EB100BAD17E /* iSAboutController.swift in Sources */,
EAE100D6250A3FF300DBBD67 /* iSColorItem.swift in Sources */,
Expand Down Expand Up @@ -1074,7 +1074,7 @@
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.liyb.iSWaller;
PRODUCT_NAME = iSWaller;
SWIFT_OBJC_BRIDGING_HEADER = "iSWaller/SupportingFiles/iSWaller-Bridging-Header.h";
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
Expand Down Expand Up @@ -1103,7 +1103,7 @@
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.liyb.iSWaller;
PRODUCT_NAME = iSWaller;
SWIFT_OBJC_BRIDGING_HEADER = "iSWaller/SupportingFiles/iSWaller-Bridging-Header.h";
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_VERSION = 5.0;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1230"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1230"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
1 change: 1 addition & 0 deletions iSWaller/iSWaller/Core/Moudles/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
} else {
statusItem.image = icon
}
statusItem.menu = menu
statusItem.button?.target = self
statusItem.button?.action = #selector(openMainMenu(_:))
statusItem.button?.sendAction(on: [.leftMouseDown, .rightMouseDown])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ extension iSDownloadController: iSDownloadItemDelegate {
selectDataSource.removeAll(where: {$0==data})
}
} else {
MBProgressHUD.showAdded(to: view, animated: true)
iSHUDManager.show(to: view)
iSDataManager.shared.remove([data]) { [unowned self] in
self.hideSelectView()
self.requestData()
MBProgressHUD.hide(for: self.view, animated: true)
iSHUDManager.hide(to: self.view)
}
}
}
Expand All @@ -156,11 +156,11 @@ extension iSDownloadController: iSDownloadItemDelegate {

extension iSDownloadController: iSDownloadSelectViewDelegate {
func downloadSelectView(didClickDelete selectView: iSDownloadSelectView) {
MBProgressHUD.showAdded(to: view, animated: true)
iSHUDManager.show(to: view)
iSDataManager.shared.remove(selectDataSource) { [unowned self] in
self.hideSelectView()
self.requestData()
MBProgressHUD.hide(for: self.view, animated: true)
iSHUDManager.hide(to: self.view)
}
}

Expand Down
Loading

0 comments on commit 9b2956b

Please sign in to comment.