diff --git a/ESPullToRefreshExample/ESPullToRefreshExample.xcodeproj/project.pbxproj b/ESPullToRefreshExample/ESPullToRefreshExample.xcodeproj/project.pbxproj index bb6c314..589dd38 100644 --- a/ESPullToRefreshExample/ESPullToRefreshExample.xcodeproj/project.pbxproj +++ b/ESPullToRefreshExample/ESPullToRefreshExample.xcodeproj/project.pbxproj @@ -314,9 +314,11 @@ TargetAttributes = { F690772C1D0D0AE300BE91FE = { CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 0800; }; F692000B1CDB9A530029EF47 = { CreatedOnToolsVersion = 7.3; + LastSwiftMigration = 0800; }; }; }; @@ -439,10 +441,12 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = ESPullToRefresh/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.eggswift.ESPullToRefresh; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SWIFT_VERSION = 2.3; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -458,10 +462,12 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = ESPullToRefresh/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.eggswift.ESPullToRefresh; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SWIFT_VERSION = 2.3; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -563,6 +569,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = eggswift.ESPullToRefreshExample; PRODUCT_NAME = ESRefresh; + SWIFT_VERSION = 2.3; }; name = Debug; }; @@ -577,6 +584,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = eggswift.ESPullToRefreshExample; PRODUCT_NAME = ESRefresh; + SWIFT_VERSION = 2.3; }; name = Release; }; diff --git a/ESPullToRefreshExample/ESPullToRefreshExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/ESPullToRefreshExample/ESPullToRefreshExample/Assets.xcassets/AppIcon.appiconset/Contents.json index e8d8aa2..25aa4ac 100644 --- a/ESPullToRefreshExample/ESPullToRefreshExample/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/ESPullToRefreshExample/ESPullToRefreshExample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "size" : "29x29", "idiom" : "iphone", @@ -36,6 +46,16 @@ "filename" : "Icon-60@3x.png", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "size" : "29x29", "idiom" : "ipad", diff --git a/ESPullToRefreshExample/ESPullToRefreshExample/WebViewController.swift b/ESPullToRefreshExample/ESPullToRefreshExample/WebViewController.swift index feaaf2a..525cf27 100644 --- a/ESPullToRefreshExample/ESPullToRefreshExample/WebViewController.swift +++ b/ESPullToRefreshExample/ESPullToRefreshExample/WebViewController.swift @@ -43,8 +43,14 @@ class WebViewController: UIViewController, UIWebViewDelegate { self.webView.scrollView.alwaysBounceVertical = true } + #if swift(>=2.3) + func webView(webView: UIWebView, didFailLoadWithError error: NSError) { + self.webView.scrollView.es_stopPullToRefresh(completion: false) + } + #else func webView(webView: UIWebView, didFailLoadWithError error: NSError?) { self.webView.scrollView.es_stopPullToRefresh(completion: false) } + #endif }