diff --git a/Demo/Demo.xcodeproj/project.pbxproj b/Demo/Demo.xcodeproj/project.pbxproj index 3c58520..c6cd122 100644 --- a/Demo/Demo.xcodeproj/project.pbxproj +++ b/Demo/Demo.xcodeproj/project.pbxproj @@ -7,25 +7,27 @@ objects = { /* Begin PBXBuildFile section */ - 145141D81C87E3A000969E54 /* DefaultView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145141D71C87E3A000969E54 /* DefaultView.swift */; }; - 145141E41C882FB000969E54 /* icon_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 145141E11C882FB000969E54 /* icon_arrow.png */; }; - 145141E51C882FB000969E54 /* icon_arrow@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 145141E21C882FB000969E54 /* icon_arrow@2x.png */; }; - 145141E61C882FB000969E54 /* icon_arrow@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 145141E31C882FB000969E54 /* icon_arrow@3x.png */; }; + 143A5F0C1C8EA4A300AC2257 /* DefaultView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143A5F091C8EA4A300AC2257 /* DefaultView.swift */; }; + 143A5F0D1C8EA4A300AC2257 /* EasyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143A5F0A1C8EA4A300AC2257 /* EasyObserver.swift */; }; + 143A5F0E1C8EA4A300AC2257 /* UIScrollView+EasyPull.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143A5F0B1C8EA4A300AC2257 /* UIScrollView+EasyPull.swift */; }; + 143A5F151C8EA53500AC2257 /* icon_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 143A5F121C8EA53500AC2257 /* icon_arrow.png */; }; + 143A5F161C8EA53500AC2257 /* icon_arrow@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 143A5F131C8EA53500AC2257 /* icon_arrow@2x.png */; }; + 143A5F171C8EA53500AC2257 /* icon_arrow@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 143A5F141C8EA53500AC2257 /* icon_arrow@3x.png */; }; 1454C8B01C7B097C00BDCC66 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1454C8AF1C7B097C00BDCC66 /* AppDelegate.swift */; }; 1454C8B21C7B097C00BDCC66 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1454C8B11C7B097C00BDCC66 /* ViewController.swift */; }; 1454C8B71C7B097C00BDCC66 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1454C8B61C7B097C00BDCC66 /* Assets.xcassets */; }; 1454C8BA1C7B097C00BDCC66 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1454C8B81C7B097C00BDCC66 /* LaunchScreen.storyboard */; }; 14CF9C111C7B127900EB5C00 /* MyTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14CF9C101C7B127900EB5C00 /* MyTableViewCell.swift */; }; - 14E05C9B1C7F40680014FFEB /* EasyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14E05C9A1C7F40680014FFEB /* EasyObserver.swift */; }; - 14E5A4491C7B497D00105DDA /* UIScrollView+EasyPull.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14E5A4481C7B497D00105DDA /* UIScrollView+EasyPull.swift */; }; 14EDD3651C896D04001A6DE4 /* MyCustomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14EDD3641C896D03001A6DE4 /* MyCustomView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 145141D71C87E3A000969E54 /* DefaultView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultView.swift; sourceTree = ""; }; - 145141E11C882FB000969E54 /* icon_arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_arrow.png; sourceTree = ""; }; - 145141E21C882FB000969E54 /* icon_arrow@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_arrow@2x.png"; sourceTree = ""; }; - 145141E31C882FB000969E54 /* icon_arrow@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_arrow@3x.png"; sourceTree = ""; }; + 143A5F091C8EA4A300AC2257 /* DefaultView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultView.swift; sourceTree = ""; }; + 143A5F0A1C8EA4A300AC2257 /* EasyObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EasyObserver.swift; sourceTree = ""; }; + 143A5F0B1C8EA4A300AC2257 /* UIScrollView+EasyPull.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIScrollView+EasyPull.swift"; sourceTree = ""; }; + 143A5F121C8EA53500AC2257 /* icon_arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_arrow.png; sourceTree = ""; }; + 143A5F131C8EA53500AC2257 /* icon_arrow@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_arrow@2x.png"; sourceTree = ""; }; + 143A5F141C8EA53500AC2257 /* icon_arrow@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_arrow@3x.png"; sourceTree = ""; }; 1454C8AC1C7B097C00BDCC66 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1454C8AF1C7B097C00BDCC66 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 1454C8B11C7B097C00BDCC66 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -33,8 +35,6 @@ 1454C8B91C7B097C00BDCC66 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 1454C8BB1C7B097C00BDCC66 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 14CF9C101C7B127900EB5C00 /* MyTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyTableViewCell.swift; sourceTree = ""; }; - 14E05C9A1C7F40680014FFEB /* EasyObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EasyObserver.swift; sourceTree = ""; }; - 14E5A4481C7B497D00105DDA /* UIScrollView+EasyPull.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIScrollView+EasyPull.swift"; sourceTree = ""; }; 14EDD3641C896D03001A6DE4 /* MyCustomView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyCustomView.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -49,12 +49,23 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 145141E01C882CFA00969E54 /* Resource */ = { + 143A5F081C8EA48500AC2257 /* EasyPull */ = { isa = PBXGroup; children = ( - 145141E11C882FB000969E54 /* icon_arrow.png */, - 145141E21C882FB000969E54 /* icon_arrow@2x.png */, - 145141E31C882FB000969E54 /* icon_arrow@3x.png */, + 143A5F111C8EA52100AC2257 /* Resource */, + 143A5F091C8EA4A300AC2257 /* DefaultView.swift */, + 143A5F0A1C8EA4A300AC2257 /* EasyObserver.swift */, + 143A5F0B1C8EA4A300AC2257 /* UIScrollView+EasyPull.swift */, + ); + path = EasyPull; + sourceTree = ""; + }; + 143A5F111C8EA52100AC2257 /* Resource */ = { + isa = PBXGroup; + children = ( + 143A5F121C8EA53500AC2257 /* icon_arrow.png */, + 143A5F131C8EA53500AC2257 /* icon_arrow@2x.png */, + 143A5F141C8EA53500AC2257 /* icon_arrow@3x.png */, ); path = Resource; sourceTree = ""; @@ -78,7 +89,7 @@ 1454C8AE1C7B097C00BDCC66 /* Demo */ = { isa = PBXGroup; children = ( - 14CF9C0F1C7B0EF500EB5C00 /* EasyPull */, + 143A5F081C8EA48500AC2257 /* EasyPull */, 1454C8AF1C7B097C00BDCC66 /* AppDelegate.swift */, 1454C8B11C7B097C00BDCC66 /* ViewController.swift */, 14CF9C101C7B127900EB5C00 /* MyTableViewCell.swift */, @@ -90,17 +101,6 @@ path = Demo; sourceTree = ""; }; - 14CF9C0F1C7B0EF500EB5C00 /* EasyPull */ = { - isa = PBXGroup; - children = ( - 145141E01C882CFA00969E54 /* Resource */, - 14E5A4481C7B497D00105DDA /* UIScrollView+EasyPull.swift */, - 14E05C9A1C7F40680014FFEB /* EasyObserver.swift */, - 145141D71C87E3A000969E54 /* DefaultView.swift */, - ); - path = EasyPull; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -160,10 +160,10 @@ buildActionMask = 2147483647; files = ( 1454C8BA1C7B097C00BDCC66 /* LaunchScreen.storyboard in Resources */, - 145141E51C882FB000969E54 /* icon_arrow@2x.png in Resources */, + 143A5F161C8EA53500AC2257 /* icon_arrow@2x.png in Resources */, 1454C8B71C7B097C00BDCC66 /* Assets.xcassets in Resources */, - 145141E61C882FB000969E54 /* icon_arrow@3x.png in Resources */, - 145141E41C882FB000969E54 /* icon_arrow.png in Resources */, + 143A5F171C8EA53500AC2257 /* icon_arrow@3x.png in Resources */, + 143A5F151C8EA53500AC2257 /* icon_arrow.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -174,13 +174,13 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 14E05C9B1C7F40680014FFEB /* EasyObserver.swift in Sources */, 14EDD3651C896D04001A6DE4 /* MyCustomView.swift in Sources */, - 14E5A4491C7B497D00105DDA /* UIScrollView+EasyPull.swift in Sources */, - 145141D81C87E3A000969E54 /* DefaultView.swift in Sources */, 1454C8B21C7B097C00BDCC66 /* ViewController.swift in Sources */, 1454C8B01C7B097C00BDCC66 /* AppDelegate.swift in Sources */, + 143A5F0D1C8EA4A300AC2257 /* EasyObserver.swift in Sources */, + 143A5F0E1C8EA4A300AC2257 /* UIScrollView+EasyPull.swift in Sources */, 14CF9C111C7B127900EB5C00 /* MyTableViewCell.swift in Sources */, + 143A5F0C1C8EA4A300AC2257 /* DefaultView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Demo/Demo/EasyPull/DefaultView.swift b/Demo/Demo/EasyPull/DefaultView.swift index d79654e..ad2ab54 100644 --- a/Demo/Demo/EasyPull/DefaultView.swift +++ b/Demo/Demo/EasyPull/DefaultView.swift @@ -12,7 +12,7 @@ public class DefaultDropView: UIView, EasyViewManual { // MARK: - constant and veriable and property let kMainBoundsWidth = UIScreen.mainScreen().bounds.size.width - let arrowImage:UIImageView = UIImageView(image: UIImage(named: "icon_arrow.png")) + let arrowImage:UIImageView = UIImageView(image: UIImage(named: "icon_arrow.png", inBundle: NSBundle(forClass: DefaultDropView.self), compatibleWithTraitCollection: nil)) let indicatorView: UIActivityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: .Gray) let titleLabel:UILabel = UILabel() @@ -77,7 +77,7 @@ public class DefaultUpView: UIView, EasyViewManual, EasyViewAutomatic { // MARK: - constant and veriable and property let kMainBoundsWidth = UIScreen.mainScreen().bounds.size.width - let arrowImage:UIImageView = UIImageView(image: UIImage(named: "icon_arrow.png")) + let arrowImage:UIImageView = UIImageView(image: UIImage(named: "icon_arrow.png", inBundle: NSBundle(forClass: DefaultDropView.self), compatibleWithTraitCollection: nil)) let indicatorView: UIActivityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: .Gray) let titleLabel:UILabel = UILabel() diff --git a/Demo/Demo/ViewController.swift b/Demo/Demo/ViewController.swift index e2c0fce..3c196aa 100644 --- a/Demo/Demo/ViewController.swift +++ b/Demo/Demo/ViewController.swift @@ -51,16 +51,16 @@ class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSour //up pull //default view //Manual mode - tableView.easy_addUpPullManual({ - NSLog("Run") - delayStopUp() - }) - - //Automatic mode -// tableView.easy_addUpPullAutomatic({ +// tableView.easy_addUpPullManual({ // NSLog("Run") // delayStopUp() // }) + + //Automatic mode + tableView.easy_addUpPullAutomatic({ + NSLog("Run") + delayStopUp() + }) //custom view //Manual mode diff --git a/EasyPull.xcworkspace/xcuserdata/ronghao.xcuserdatad/UserInterfaceState.xcuserstate b/EasyPull.xcworkspace/xcuserdata/ronghao.xcuserdatad/UserInterfaceState.xcuserstate index 04a56cb..24e1bb5 100644 Binary files a/EasyPull.xcworkspace/xcuserdata/ronghao.xcuserdatad/UserInterfaceState.xcuserstate and b/EasyPull.xcworkspace/xcuserdata/ronghao.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/EasyPull/EasyPull/DefaultView.swift b/EasyPull/EasyPull/DefaultView.swift index d79654e..ad2ab54 100644 --- a/EasyPull/EasyPull/DefaultView.swift +++ b/EasyPull/EasyPull/DefaultView.swift @@ -12,7 +12,7 @@ public class DefaultDropView: UIView, EasyViewManual { // MARK: - constant and veriable and property let kMainBoundsWidth = UIScreen.mainScreen().bounds.size.width - let arrowImage:UIImageView = UIImageView(image: UIImage(named: "icon_arrow.png")) + let arrowImage:UIImageView = UIImageView(image: UIImage(named: "icon_arrow.png", inBundle: NSBundle(forClass: DefaultDropView.self), compatibleWithTraitCollection: nil)) let indicatorView: UIActivityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: .Gray) let titleLabel:UILabel = UILabel() @@ -77,7 +77,7 @@ public class DefaultUpView: UIView, EasyViewManual, EasyViewAutomatic { // MARK: - constant and veriable and property let kMainBoundsWidth = UIScreen.mainScreen().bounds.size.width - let arrowImage:UIImageView = UIImageView(image: UIImage(named: "icon_arrow.png")) + let arrowImage:UIImageView = UIImageView(image: UIImage(named: "icon_arrow.png", inBundle: NSBundle(forClass: DefaultDropView.self), compatibleWithTraitCollection: nil)) let indicatorView: UIActivityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: .Gray) let titleLabel:UILabel = UILabel()