diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..8d9b14a Binary files /dev/null and b/.DS_Store differ diff --git a/PhotoBrowser.xcodeproj/project.xcworkspace/xcuserdata/DogWang.xcuserdatad/UserInterfaceState.xcuserstate b/PhotoBrowser.xcodeproj/project.xcworkspace/xcuserdata/DogWang.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..2c2bc62 Binary files /dev/null and b/PhotoBrowser.xcodeproj/project.xcworkspace/xcuserdata/DogWang.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/PhotoBrowser.xcodeproj/xcuserdata/DogWang.xcuserdatad/xcschemes/PhotoBrowser.xcscheme b/PhotoBrowser.xcodeproj/xcuserdata/DogWang.xcuserdatad/xcschemes/PhotoBrowser.xcscheme new file mode 100644 index 0000000..b9bc0a2 --- /dev/null +++ b/PhotoBrowser.xcodeproj/xcuserdata/DogWang.xcuserdatad/xcschemes/PhotoBrowser.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PhotoBrowser.xcodeproj/xcuserdata/DogWang.xcuserdatad/xcschemes/xcschememanagement.plist b/PhotoBrowser.xcodeproj/xcuserdata/DogWang.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..9fb2a9b --- /dev/null +++ b/PhotoBrowser.xcodeproj/xcuserdata/DogWang.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,27 @@ + + + + + SchemeUserState + + PhotoBrowser.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 89CA44421B7F96030061FEFC + + primary + + + 89CA44571B7F96030061FEFC + + primary + + + + + diff --git a/PhotoBrowser/PhotoBrowser/Controller/PhotoBrowser+HUD.swift b/PhotoBrowser/PhotoBrowser/Controller/PhotoBrowser+HUD.swift index 33f9844..c9d5cbf 100644 --- a/PhotoBrowser/PhotoBrowser/Controller/PhotoBrowser+HUD.swift +++ b/PhotoBrowser/PhotoBrowser/Controller/PhotoBrowser+HUD.swift @@ -26,9 +26,10 @@ extension PhotoBrowser{ if autoDismiss == -1 {return} - dispatch_after(dispatch_time(DISPATCH_TIME_NOW,Int64(autoDismiss * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), {[unowned self] () -> Void in - - self.dismissHUD() + dispatch_after(dispatch_time(DISPATCH_TIME_NOW,Int64(autoDismiss * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), {[weak self] () -> Void in + if self != nil { + self!.dismissHUD() + } }) } diff --git a/PhotoBrowser/PhotoBrowser/Controller/PhotoBrowser+Main.swift b/PhotoBrowser/PhotoBrowser/Controller/PhotoBrowser+Main.swift index 279f168..7ae9064 100644 --- a/PhotoBrowser/PhotoBrowser/Controller/PhotoBrowser+Main.swift +++ b/PhotoBrowser/PhotoBrowser/Controller/PhotoBrowser+Main.swift @@ -72,12 +72,10 @@ extension PhotoBrowser{ if (didFinishSavingWithError as NSError?) == nil { showHUD("保存失败", autoDismiss: 2) - } - else{ - showHUD("保存成功", autoDismiss: 2) - //记录 photoArchiverArr.append(page) + }else{ + showHUD("保存失败", autoDismiss: 2) } }