From 5716324dd7e1ab50bf59e57677d7f7fa9421dbb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=E4=BA=86=E4=B8=AAJ?= Date: Thu, 28 Sep 2017 16:10:23 +0800 Subject: [PATCH] MD + Carthage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.修改MD 2.支持Carthage 3.完善contentInset的设置 --- MJRefresh.podspec | 2 +- MJRefresh/Base/MJRefreshComponent.h | 3 +- MJRefresh/Base/MJRefreshComponent.m | 2 +- MJRefresh/UIScrollView+MJExtension.m | 10 + MJRefreshExample.xcodeproj/project.pbxproj | 250 ++++++++++++++++++ .../xcschemes/MJRefreshFramework.xcscheme | 82 ++++++ MJRefreshFramework/Info.plist | 24 ++ MJRefreshFramework/MJRefreshFramework.h | 19 ++ README.md | 88 +++--- 9 files changed, 433 insertions(+), 47 deletions(-) create mode 100644 MJRefreshExample.xcodeproj/xcshareddata/xcschemes/MJRefreshFramework.xcscheme create mode 100644 MJRefreshFramework/Info.plist create mode 100644 MJRefreshFramework/MJRefreshFramework.h diff --git a/MJRefresh.podspec b/MJRefresh.podspec index 01fcc651..c013dcc7 100644 --- a/MJRefresh.podspec +++ b/MJRefresh.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'MJRefresh' - s.version = '3.1.13' + s.version = '3.1.14' s.summary = 'An easy way to use pull-to-refresh' s.homepage = 'https://github.com/CoderMJLee/MJRefresh' s.license = 'MIT' diff --git a/MJRefresh/Base/MJRefreshComponent.h b/MJRefresh/Base/MJRefreshComponent.h index 9e96c898..f8adf4ef 100644 --- a/MJRefresh/Base/MJRefreshComponent.h +++ b/MJRefresh/Base/MJRefreshComponent.h @@ -68,7 +68,8 @@ typedef void (^MJRefreshComponentEndRefreshingCompletionBlock)(); - (void)endRefreshing; - (void)endRefreshingWithCompletionBlock:(void (^)())completionBlock; /** 是否正在刷新 */ -- (BOOL)isRefreshing; +@property (assign, nonatomic, readonly, getter=isRefreshing) BOOL refreshing; +//- (BOOL)isRefreshing; /** 刷新状态 一般交给子类内部实现 */ @property (assign, nonatomic) MJRefreshState state; diff --git a/MJRefresh/Base/MJRefreshComponent.m b/MJRefresh/Base/MJRefreshComponent.m index 5ae8139f..8c04df5b 100644 --- a/MJRefresh/Base/MJRefreshComponent.m +++ b/MJRefresh/Base/MJRefreshComponent.m @@ -95,7 +95,7 @@ - (void)addObservers - (void)removeObservers { [self.superview removeObserver:self forKeyPath:MJRefreshKeyPathContentOffset]; - [self.superview removeObserver:self forKeyPath:MJRefreshKeyPathContentSize];; + [self.superview removeObserver:self forKeyPath:MJRefreshKeyPathContentSize]; [self.pan removeObserver:self forKeyPath:MJRefreshKeyPathPanState]; self.pan = nil; } diff --git a/MJRefresh/UIScrollView+MJExtension.m b/MJRefresh/UIScrollView+MJExtension.m index 29f4cae6..094e9107 100644 --- a/MJRefresh/UIScrollView+MJExtension.m +++ b/MJRefresh/UIScrollView+MJExtension.m @@ -60,6 +60,11 @@ - (void)setMj_insetL:(CGFloat)mj_insetL { UIEdgeInsets inset = self.contentInset; inset.left = mj_insetL; +#ifdef __IPHONE_11_0 + if(@available(iOS 11.0, *)){ + inset.left -= (self.adjustedContentInset.left - self.contentInset.left); + } +#endif self.contentInset = inset; } @@ -72,6 +77,11 @@ - (void)setMj_insetR:(CGFloat)mj_insetR { UIEdgeInsets inset = self.contentInset; inset.right = mj_insetR; +#ifdef __IPHONE_11_0 + if(@available(iOS 11.0, *)){ + inset.right -= (self.adjustedContentInset.right - self.contentInset.right); + } +#endif self.contentInset = inset; } diff --git a/MJRefreshExample.xcodeproj/project.pbxproj b/MJRefreshExample.xcodeproj/project.pbxproj index d7617446..d4047318 100644 --- a/MJRefreshExample.xcodeproj/project.pbxproj +++ b/MJRefreshExample.xcodeproj/project.pbxproj @@ -28,6 +28,46 @@ 2D9BEB1A1BB15F4A00AED473 /* MJTestViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2D9BEB051BB15F4A00AED473 /* MJTestViewController.xib */; }; 2D9BEB1B1BB15F4A00AED473 /* MJWebViewViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BEB071BB15F4A00AED473 /* MJWebViewViewController.m */; }; 2D9BEB1C1BB15F4A00AED473 /* MJWebViewViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2D9BEB081BB15F4A00AED473 /* MJWebViewViewController.xib */; }; + 2D9DF45A1F7CE2C20042D6DD /* MJRefreshAutoFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2E9EC1BECBE6700D58F6A /* MJRefreshAutoFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF45B1F7CE2C20042D6DD /* MJRefreshBackFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2E9EE1BECBE6700D58F6A /* MJRefreshBackFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF45C1F7CE2C20042D6DD /* MJRefreshComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2E9F01BECBE6700D58F6A /* MJRefreshComponent.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF45D1F7CE2C20042D6DD /* MJRefreshFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2E9F21BECBE6700D58F6A /* MJRefreshFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF45E1F7CE2C20042D6DD /* MJRefreshHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2E9F41BECBE6700D58F6A /* MJRefreshHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF45F1F7CE2C20042D6DD /* MJRefreshAutoGifFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2E9F91BECBE6700D58F6A /* MJRefreshAutoGifFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF4601F7CE2C20042D6DD /* MJRefreshAutoNormalFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2E9FB1BECBE6700D58F6A /* MJRefreshAutoNormalFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF4611F7CE2C20042D6DD /* MJRefreshAutoStateFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2E9FD1BECBE6700D58F6A /* MJRefreshAutoStateFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF4621F7CE2C20042D6DD /* MJRefreshBackGifFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2EA001BECBE6700D58F6A /* MJRefreshBackGifFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF4631F7CE2C20042D6DD /* MJRefreshBackNormalFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2EA021BECBE6700D58F6A /* MJRefreshBackNormalFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF4641F7CE2C20042D6DD /* MJRefreshBackStateFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2EA041BECBE6700D58F6A /* MJRefreshBackStateFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF4651F7CE2C20042D6DD /* MJRefreshGifHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2EA071BECBE6700D58F6A /* MJRefreshGifHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF4661F7CE2C20042D6DD /* MJRefreshNormalHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2EA091BECBE6700D58F6A /* MJRefreshNormalHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF4671F7CE2C20042D6DD /* MJRefreshStateHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2EA0B1BECBE6700D58F6A /* MJRefreshStateHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF4681F7CE2C20042D6DD /* MJRefresh.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2EA0E1BECBE6700D58F6A /* MJRefresh.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF4691F7CE2C20042D6DD /* MJRefreshConst.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2EA0F1BECBE6700D58F6A /* MJRefreshConst.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF46A1F7CE2C20042D6DD /* UIScrollView+MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2EA111BECBE6700D58F6A /* UIScrollView+MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF46B1F7CE2C20042D6DD /* UIScrollView+MJRefresh.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2EA131BECBE6700D58F6A /* UIScrollView+MJRefresh.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF46C1F7CE2C20042D6DD /* UIView+MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB2EA151BECBE6700D58F6A /* UIView+MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF46D1F7CE2C20042D6DD /* NSBundle+MJRefresh.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D4698841D0EE6A400CB8025 /* NSBundle+MJRefresh.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D9DF46E1F7CE2D60042D6DD /* MJRefresh.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2DB2EA0D1BECBE6700D58F6A /* MJRefresh.bundle */; }; + 2D9DF46F1F7CE2F90042D6DD /* MJRefreshAutoFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2E9ED1BECBE6700D58F6A /* MJRefreshAutoFooter.m */; }; + 2D9DF4701F7CE2F90042D6DD /* MJRefreshBackFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2E9EF1BECBE6700D58F6A /* MJRefreshBackFooter.m */; }; + 2D9DF4711F7CE2F90042D6DD /* MJRefreshComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2E9F11BECBE6700D58F6A /* MJRefreshComponent.m */; }; + 2D9DF4721F7CE2F90042D6DD /* MJRefreshFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2E9F31BECBE6700D58F6A /* MJRefreshFooter.m */; }; + 2D9DF4731F7CE2F90042D6DD /* MJRefreshHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2E9F51BECBE6700D58F6A /* MJRefreshHeader.m */; }; + 2D9DF4741F7CE2F90042D6DD /* MJRefreshAutoGifFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2E9FA1BECBE6700D58F6A /* MJRefreshAutoGifFooter.m */; }; + 2D9DF4751F7CE2F90042D6DD /* MJRefreshAutoNormalFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2E9FC1BECBE6700D58F6A /* MJRefreshAutoNormalFooter.m */; }; + 2D9DF4761F7CE2F90042D6DD /* MJRefreshAutoStateFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2E9FE1BECBE6700D58F6A /* MJRefreshAutoStateFooter.m */; }; + 2D9DF4771F7CE2F90042D6DD /* MJRefreshBackGifFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2EA011BECBE6700D58F6A /* MJRefreshBackGifFooter.m */; }; + 2D9DF4781F7CE2F90042D6DD /* MJRefreshBackNormalFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2EA031BECBE6700D58F6A /* MJRefreshBackNormalFooter.m */; }; + 2D9DF4791F7CE2F90042D6DD /* MJRefreshBackStateFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2EA051BECBE6700D58F6A /* MJRefreshBackStateFooter.m */; }; + 2D9DF47A1F7CE2F90042D6DD /* MJRefreshGifHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2EA081BECBE6700D58F6A /* MJRefreshGifHeader.m */; }; + 2D9DF47B1F7CE2F90042D6DD /* MJRefreshNormalHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2EA0A1BECBE6700D58F6A /* MJRefreshNormalHeader.m */; }; + 2D9DF47C1F7CE2F90042D6DD /* MJRefreshStateHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2EA0C1BECBE6700D58F6A /* MJRefreshStateHeader.m */; }; + 2D9DF47D1F7CE2F90042D6DD /* MJRefreshConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2EA101BECBE6700D58F6A /* MJRefreshConst.m */; }; + 2D9DF47E1F7CE2F90042D6DD /* UIScrollView+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2EA121BECBE6700D58F6A /* UIScrollView+MJExtension.m */; }; + 2D9DF47F1F7CE2F90042D6DD /* UIScrollView+MJRefresh.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2EA141BECBE6700D58F6A /* UIScrollView+MJRefresh.m */; }; + 2D9DF4801F7CE2F90042D6DD /* UIView+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB2EA161BECBE6700D58F6A /* UIView+MJExtension.m */; }; + 2D9DF4811F7CE2F90042D6DD /* NSBundle+MJRefresh.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D4698851D0EE6A400CB8025 /* NSBundle+MJRefresh.m */; }; 2DA7F92B1AA6B4C4005627AB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DA7F92A1AA6B4C4005627AB /* main.m */; }; 2DA7F9341AA6B4C4005627AB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2DA7F9321AA6B4C4005627AB /* Main.storyboard */; }; 2DA7F9361AA6B4C4005627AB /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2DA7F9351AA6B4C4005627AB /* Images.xcassets */; }; @@ -64,6 +104,19 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 2D9DF3EC1F7CD8F50042D6DD /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 2D4698841D0EE6A400CB8025 /* NSBundle+MJRefresh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSBundle+MJRefresh.h"; sourceTree = ""; }; 2D4698851D0EE6A400CB8025 /* NSBundle+MJRefresh.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSBundle+MJRefresh.m"; sourceTree = ""; }; @@ -105,6 +158,8 @@ 2D9BEB061BB15F4A00AED473 /* MJWebViewViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MJWebViewViewController.h; sourceTree = ""; }; 2D9BEB071BB15F4A00AED473 /* MJWebViewViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MJWebViewViewController.m; sourceTree = ""; }; 2D9BEB081BB15F4A00AED473 /* MJWebViewViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MJWebViewViewController.xib; sourceTree = ""; }; + 2D9DF4521F7CE29B0042D6DD /* MJRefresh.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MJRefresh.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2D9DF4551F7CE29B0042D6DD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 2DA7F9251AA6B4C4005627AB /* MJRefreshExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MJRefreshExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 2DA7F9291AA6B4C4005627AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 2DA7F92A1AA6B4C4005627AB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -156,6 +211,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 2D9DF44E1F7CE29B0042D6DD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 2DA7F9221AA6B4C4005627AB /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -246,11 +308,20 @@ path = Second; sourceTree = ""; }; + 2D9DF4531F7CE29B0042D6DD /* MJRefreshFramework */ = { + isa = PBXGroup; + children = ( + 2D9DF4551F7CE29B0042D6DD /* Info.plist */, + ); + path = MJRefreshFramework; + sourceTree = ""; + }; 2DA7F91C1AA6B4C4005627AB = { isa = PBXGroup; children = ( 2DA7F9271AA6B4C4005627AB /* MJRefreshExample */, 2DA7F9411AA6B4C4005627AB /* MJRefreshExampleTests */, + 2D9DF4531F7CE29B0042D6DD /* MJRefreshFramework */, 2DA7F9261AA6B4C4005627AB /* Products */, ); sourceTree = ""; @@ -260,6 +331,7 @@ children = ( 2DA7F9251AA6B4C4005627AB /* MJRefreshExample.app */, 2DA7F93E1AA6B4C4005627AB /* MJRefreshExampleTests.xctest */, + 2D9DF4521F7CE29B0042D6DD /* MJRefresh.framework */, ); name = Products; sourceTree = ""; @@ -413,7 +485,55 @@ }; /* End PBXGroup section */ +/* Begin PBXHeadersBuildPhase section */ + 2D9DF44F1F7CE29B0042D6DD /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D9DF45A1F7CE2C20042D6DD /* MJRefreshAutoFooter.h in Headers */, + 2D9DF45B1F7CE2C20042D6DD /* MJRefreshBackFooter.h in Headers */, + 2D9DF45C1F7CE2C20042D6DD /* MJRefreshComponent.h in Headers */, + 2D9DF45D1F7CE2C20042D6DD /* MJRefreshFooter.h in Headers */, + 2D9DF45E1F7CE2C20042D6DD /* MJRefreshHeader.h in Headers */, + 2D9DF45F1F7CE2C20042D6DD /* MJRefreshAutoGifFooter.h in Headers */, + 2D9DF4601F7CE2C20042D6DD /* MJRefreshAutoNormalFooter.h in Headers */, + 2D9DF4611F7CE2C20042D6DD /* MJRefreshAutoStateFooter.h in Headers */, + 2D9DF4621F7CE2C20042D6DD /* MJRefreshBackGifFooter.h in Headers */, + 2D9DF4631F7CE2C20042D6DD /* MJRefreshBackNormalFooter.h in Headers */, + 2D9DF4641F7CE2C20042D6DD /* MJRefreshBackStateFooter.h in Headers */, + 2D9DF4651F7CE2C20042D6DD /* MJRefreshGifHeader.h in Headers */, + 2D9DF4661F7CE2C20042D6DD /* MJRefreshNormalHeader.h in Headers */, + 2D9DF4671F7CE2C20042D6DD /* MJRefreshStateHeader.h in Headers */, + 2D9DF4681F7CE2C20042D6DD /* MJRefresh.h in Headers */, + 2D9DF4691F7CE2C20042D6DD /* MJRefreshConst.h in Headers */, + 2D9DF46A1F7CE2C20042D6DD /* UIScrollView+MJExtension.h in Headers */, + 2D9DF46B1F7CE2C20042D6DD /* UIScrollView+MJRefresh.h in Headers */, + 2D9DF46C1F7CE2C20042D6DD /* UIView+MJExtension.h in Headers */, + 2D9DF46D1F7CE2C20042D6DD /* NSBundle+MJRefresh.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + /* Begin PBXNativeTarget section */ + 2D9DF4511F7CE29B0042D6DD /* MJRefreshFramework */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D9DF4571F7CE29B0042D6DD /* Build configuration list for PBXNativeTarget "MJRefreshFramework" */; + buildPhases = ( + 2D9DF44D1F7CE29B0042D6DD /* Sources */, + 2D9DF44E1F7CE29B0042D6DD /* Frameworks */, + 2D9DF44F1F7CE29B0042D6DD /* Headers */, + 2D9DF4501F7CE29B0042D6DD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MJRefreshFramework; + productName = MJRefreshFramework; + productReference = 2D9DF4521F7CE29B0042D6DD /* MJRefresh.framework */; + productType = "com.apple.product-type.framework"; + }; 2DA7F9241AA6B4C4005627AB /* MJRefreshExample */ = { isa = PBXNativeTarget; buildConfigurationList = 2DA7F9481AA6B4C4005627AB /* Build configuration list for PBXNativeTarget "MJRefreshExample" */; @@ -421,6 +541,7 @@ 2DA7F9211AA6B4C4005627AB /* Sources */, 2DA7F9221AA6B4C4005627AB /* Frameworks */, 2DA7F9231AA6B4C4005627AB /* Resources */, + 2D9DF3EC1F7CD8F50042D6DD /* Embed Frameworks */, ); buildRules = ( ); @@ -459,6 +580,10 @@ LastUpgradeCheck = 0700; ORGANIZATIONNAME = "小码哥"; TargetAttributes = { + 2D9DF4511F7CE29B0042D6DD = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + }; 2DA7F9241AA6B4C4005627AB = { CreatedOnToolsVersion = 6.1; }; @@ -483,11 +608,20 @@ targets = ( 2DA7F9241AA6B4C4005627AB /* MJRefreshExample */, 2DA7F93D1AA6B4C4005627AB /* MJRefreshExampleTests */, + 2D9DF4511F7CE29B0042D6DD /* MJRefreshFramework */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 2D9DF4501F7CE29B0042D6DD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D9DF46E1F7CE2D60042D6DD /* MJRefresh.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 2DA7F9231AA6B4C4005627AB /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -511,6 +645,32 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 2D9DF44D1F7CE29B0042D6DD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D9DF46F1F7CE2F90042D6DD /* MJRefreshAutoFooter.m in Sources */, + 2D9DF4701F7CE2F90042D6DD /* MJRefreshBackFooter.m in Sources */, + 2D9DF4711F7CE2F90042D6DD /* MJRefreshComponent.m in Sources */, + 2D9DF4721F7CE2F90042D6DD /* MJRefreshFooter.m in Sources */, + 2D9DF4731F7CE2F90042D6DD /* MJRefreshHeader.m in Sources */, + 2D9DF4741F7CE2F90042D6DD /* MJRefreshAutoGifFooter.m in Sources */, + 2D9DF4751F7CE2F90042D6DD /* MJRefreshAutoNormalFooter.m in Sources */, + 2D9DF4761F7CE2F90042D6DD /* MJRefreshAutoStateFooter.m in Sources */, + 2D9DF4771F7CE2F90042D6DD /* MJRefreshBackGifFooter.m in Sources */, + 2D9DF4781F7CE2F90042D6DD /* MJRefreshBackNormalFooter.m in Sources */, + 2D9DF4791F7CE2F90042D6DD /* MJRefreshBackStateFooter.m in Sources */, + 2D9DF47A1F7CE2F90042D6DD /* MJRefreshGifHeader.m in Sources */, + 2D9DF47B1F7CE2F90042D6DD /* MJRefreshNormalHeader.m in Sources */, + 2D9DF47C1F7CE2F90042D6DD /* MJRefreshStateHeader.m in Sources */, + 2D9DF47D1F7CE2F90042D6DD /* MJRefreshConst.m in Sources */, + 2D9DF47E1F7CE2F90042D6DD /* UIScrollView+MJExtension.m in Sources */, + 2D9DF47F1F7CE2F90042D6DD /* UIScrollView+MJRefresh.m in Sources */, + 2D9DF4801F7CE2F90042D6DD /* UIView+MJExtension.m in Sources */, + 2D9DF4811F7CE2F90042D6DD /* NSBundle+MJRefresh.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 2DA7F9211AA6B4C4005627AB /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -594,6 +754,87 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 2D9DF4581F7CE29B0042D6DD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = MJRefreshFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.520it.MJRefreshFramework; + PRODUCT_MODULE_NAME = MJRefresh; + PRODUCT_NAME = MJRefresh; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 2D9DF4591F7CE29B0042D6DD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = MJRefreshFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.520it.MJRefreshFramework; + PRODUCT_MODULE_NAME = MJRefresh; + PRODUCT_NAME = MJRefresh; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; 2DA7F9461AA6B4C4005627AB /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -740,6 +981,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 2D9DF4571F7CE29B0042D6DD /* Build configuration list for PBXNativeTarget "MJRefreshFramework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D9DF4581F7CE29B0042D6DD /* Debug */, + 2D9DF4591F7CE29B0042D6DD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 2DA7F9201AA6B4C4005627AB /* Build configuration list for PBXProject "MJRefreshExample" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/MJRefreshExample.xcodeproj/xcshareddata/xcschemes/MJRefreshFramework.xcscheme b/MJRefreshExample.xcodeproj/xcshareddata/xcschemes/MJRefreshFramework.xcscheme new file mode 100644 index 00000000..7cf1554b --- /dev/null +++ b/MJRefreshExample.xcodeproj/xcshareddata/xcschemes/MJRefreshFramework.xcscheme @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MJRefreshFramework/Info.plist b/MJRefreshFramework/Info.plist new file mode 100644 index 00000000..1007fd9d --- /dev/null +++ b/MJRefreshFramework/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/MJRefreshFramework/MJRefreshFramework.h b/MJRefreshFramework/MJRefreshFramework.h new file mode 100644 index 00000000..7dc32574 --- /dev/null +++ b/MJRefreshFramework/MJRefreshFramework.h @@ -0,0 +1,19 @@ +// +// MJRefreshFramework.h +// MJRefreshFramework +// +// Created by MJ Lee on 2017/9/28. +// Copyright © 2017年 小码哥. All rights reserved. +// + +#import + +//! Project version number for MJRefreshFramework. +FOUNDATION_EXPORT double MJRefreshFrameworkVersionNumber; + +//! Project version string for MJRefreshFramework. +FOUNDATION_EXPORT const unsigned char MJRefreshFrameworkVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/README.md b/README.md index aa400578..8bf7874f 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ ## Contents * Getting Started - * [Features【Support what kinds of controls to refresh】](#Support what kinds of controls to refresh) - * [Installation【How to use MJRefresh】](#How to use MJRefresh) - * [Who's using【More than hundreds of Apps are using MJRefresh】](#>More than hundreds of Apps are using MJRefresh) - * [Classes【The Class Structure Chart of MJRefresh】](#The Class Structure Chart of MJRefresh) + * [Features【Support what kinds of controls to refresh】](#Support_what_kinds_of_controls_to_refresh) + * [Installation【How to use MJRefresh】](#How_to_use_MJRefresh) + * [Who's using【More than hundreds of Apps are using MJRefresh】](#More_than_hundreds_of_Apps_are_using_MJRefresh) + * [Classes【The Class Structure Chart of MJRefresh】](#The_Class_Structure_Chart_of_MJRefresh) * Comment API * [MJRefreshComponent.h](#MJRefreshComponent.h) * [MJRefreshHeader.h](#MJRefreshHeader.h) @@ -15,30 +15,30 @@ * [MJRefreshAutoFooter.h](#MJRefreshAutoFooter.h) * Examples * [Reference](#Reference) - * [The drop-down refresh 01-Default](#The drop-down refresh 01-Default) - * [The drop-down refresh 02-Animation image](#The drop-down refresh 02-Animation image) - * [The drop-down refresh 03-Hide the time](#The drop-down refresh 03-Hide the time) - * [The drop-down refresh 04-Hide status and time](#The drop-down refresh 04-Hide status and time) - * [The drop-down refresh 05-DIY title](#The drop-down refresh 05-DIY title) - * [The drop-down refresh 06-DIY the control of refresh](#The drop-down refresh 06-DIY the control of refresh) - * [The pull to refresh 01-Default](#The pull to refresh 01-Default) - * [The pull to refresh 02-Animation image](#The pull to refresh 02-Animation image) - * [The pull to refresh 03-Hide the title of refresh status](#The pull to refresh 03-Hide the title of refresh status) - * [The pull to refresh 04-All loaded](#The pull to refresh 04-All loaded) - * [The pull to refresh 05-DIY title](#The pull to refresh 05-DIY title) - * [The pull to refresh 06-Hidden After loaded](#The pull to refresh 06-Hidden After loaded) - * [The pull to refresh 07-Automatic back of the pull01](#上The pull to refresh 07-Automatic back of the pull01) - * [The pull to refresh 08-Automatic back of the pull02](#The pull to refresh 08-Automatic back of the pull02) - * [The pull to refresh 09-DIY the control of refresh(Automatic refresh)](#The pull to refresh 09-DIY the control of refresh(Automatic refresh)) - * [The pull to refresh 10-DIY the control of refresh(Automatic back)](#The pull to refresh 10-DIY the control of refresh(Automatic back)) - * [UICollectionView01-The pull and drop-down refresh](#UICollectionView01-The pull and drop-down refresh) - * [UIWebView01-The drop-down refresh](#UIWebView01-The drop-down refresh) + * [The drop-down refresh 01-Default](#The_drop-down_refresh_01-Default) + * [The drop-down refresh 02-Animation image](#The_drop-down_refresh_02-Animation_image) + * [The drop-down refresh 03-Hide the time](#The_drop-down_refresh_03-Hide_the_time) + * [The drop-down refresh 04-Hide status and time](#The_drop-down_refresh_04-Hide_status_and_time) + * [The drop-down refresh 05-DIY title](#The_drop-down_refresh_05-DIY_title) + * [The drop-down refresh 06-DIY the control of refresh](#The_drop-down_refresh_06-DIY_the_control_of_refresh) + * [The pull to refresh 01-Default](#The_pull_to_refresh_01-Default) + * [The pull to refresh 02-Animation image](#The_pull_to_refresh_02-Animation_image) + * [The pull to refresh 03-Hide the title of refresh status](#The_pull_to_refresh_03-Hide_the_title_of_refresh_status) + * [The pull to refresh 04-All loaded](#The_pull_to_refresh_04-All_loaded) + * [The pull to refresh 05-DIY title](#The_pull_to_refresh_05-DIY_title) + * [The pull to refresh 06-Hidden After loaded](#The_pull_to_refresh_06-Hidden_After_loaded) + * [The pull to refresh 07-Automatic back of the pull01](#The_pull_to_refresh_07-Automatic_back_of_the_pull01) + * [The pull to refresh 08-Automatic back of the pull02](#The_pull_to_refresh_08-Automatic_back_of_the_pull02) + * [The pull to refresh 09-DIY the control of refresh(Automatic refresh)](#The_pull_to_refresh_09-DIY_the_control_of_refresh(Automatic_refresh)) + * [The pull to refresh 10-DIY the control of refresh(Automatic back)](#The_pull_to_refresh_10-DIY_the_control_of_refresh(Automatic_back)) + * [UICollectionView01-The pull and drop-down refresh](#UICollectionView01-The_pull_and_drop-down_refresh) + * [UIWebView01-The drop-down refresh](#UIWebView01-The_drop-down_refresh) * [Hope](#Hope) -## Support what kinds of controls to refresh +## Support what kinds of controls to refresh * `UIScrollView`、`UITableView`、`UICollectionView`、`UIWebView` -## How to use MJRefresh +## How to use MJRefresh * Installation with CocoaPods:`pod 'MJRefresh'` * Manual import: * Drag All files in the `MJRefresh` folder to project @@ -53,11 +53,11 @@ UIScrollView+MJRefresh.h UIScrollView+MJRefresh.m UIView+MJExtension.h UIView+MJExtension.m ``` -## More than hundreds of Apps are using MJRefresh +## More than hundreds of Apps are using MJRefresh * More information of App can focus on:[M了个J-博客园](http://www.cnblogs.com/mjios/p/4409853.html) -## The Class Structure Chart of MJRefresh +## The Class Structure Chart of MJRefresh ![](http://images0.cnblogs.com/blog2015/497279/201506/132232456139177.png) - `The class of red text` in the chart:You can use them directly - The drop-down refresh control types @@ -150,7 +150,7 @@ UIView+MJExtension.h UIView+MJExtension.m ``` -## The drop-down refresh 01-Default +## The drop-down refresh 01-Default ```objc self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ @@ -165,7 +165,7 @@ self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingTarget:self r ``` ![(下拉刷新01-普通)](http://images0.cnblogs.com/blog2015/497279/201506/141204343486151.gif) -## The drop-down refresh 02-Animation image +## The drop-down refresh 02-Animation image ```objc // Set the callback(一Once you enter the refresh status,then call the action of target,that is call [self loadNewData]) MJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)]; @@ -180,14 +180,14 @@ self.tableView.mj_header = header; ``` ![(下拉刷新02-动画图片)](http://images0.cnblogs.com/blog2015/497279/201506/141204402238389.gif) -## The drop-down refresh 03-Hide the time +## The drop-down refresh 03-Hide the time ```objc // Hide the time header.lastUpdatedTimeLabel.hidden = YES; ``` ![(下拉刷新03-隐藏时间)](http://images0.cnblogs.com/blog2015/497279/201506/141204456132944.gif) -## The drop-down refresh 04-Hide status and time +## The drop-down refresh 04-Hide status and time ```objc // Hide the time header.lastUpdatedTimeLabel.hidden = YES; @@ -197,7 +197,7 @@ header.stateLabel.hidden = YES; ``` ![(下拉刷新04-隐藏状态和时间0)](http://images0.cnblogs.com/blog2015/497279/201506/141204508639539.gif) -## The drop-down refresh 05-DIY title +## The drop-down refresh 05-DIY title ```objc // Set title [header setTitle:@"Pull down to refresh" forState:MJRefreshStateIdle]; @@ -214,14 +214,14 @@ header.lastUpdatedTimeLabel.textColor = [UIColor blueColor]; ``` ![(下拉刷新05-自定义文字)](http://images0.cnblogs.com/blog2015/497279/201506/141204563633593.gif) -## The drop-down refresh 06-DIY the control of refresh +## The drop-down refresh 06-DIY the control of refresh ```objc self.tableView.mj_header = [MJDIYHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)]; // Implementation reference to MJDIYHeader.h和MJDIYHeader.m ``` ![(下拉刷新06-自定义刷新控件)](http://images0.cnblogs.com/blog2015/497279/201506/141205019261159.gif) -## The pull to refresh 01-Default +## The pull to refresh 01-Default ```objc self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ //Call this Block When enter the refresh status automatically @@ -232,7 +232,7 @@ self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingTarget ``` ![(上拉刷新01-默认)](http://images0.cnblogs.com/blog2015/497279/201506/141205090047696.gif) -## The pull to refresh 02-Animation image +## The pull to refresh 02-Animation image ```objc // Set the callback(Once you enter the refresh status,then call the action of target,that is call [self loadMoreData]) MJRefreshAutoGifFooter *footer = [MJRefreshAutoGifFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; @@ -245,7 +245,7 @@ self.tableView.mj_footer = footer; ``` ![(上拉刷新02-动画图片)](http://images0.cnblogs.com/blog2015/497279/201506/141205141445793.gif) -## The pull to refresh 03-Hide the title of refresh status +## The pull to refresh 03-Hide the title of refresh status ```objc // Hide the title of refresh status footer.refreshingTitleHidden = YES; @@ -253,14 +253,14 @@ footer.refreshingTitleHidden = YES; ``` ![(上拉刷新03-隐藏刷新状态的文字)](http://images0.cnblogs.com/blog2015/497279/201506/141205200985774.gif) -## The pull to refresh 04-All loaded +## The pull to refresh 04-All loaded ```objc //Become the status of NoMoreData [footer noticeNoMoreData]; ``` ![(上拉刷新04-全部加载完毕)](http://images0.cnblogs.com/blog2015/497279/201506/141205248634686.gif) -## The pull to refresh 05-DIY title +## The pull to refresh 05-DIY title ```objc // Set title [footer setTitle:@"Click or drag up to refresh" forState:MJRefreshStateIdle]; @@ -275,20 +275,20 @@ footer.stateLabel.textColor = [UIColor blueColor]; ``` ![(上拉刷新05-自定义文字)](http://images0.cnblogs.com/blog2015/497279/201506/141205295511153.gif) -## The pull to refresh 06-Hidden After loaded +## The pull to refresh 06-Hidden After loaded ```objc //Hidden current control of the pull to refresh self.tableView.mj_footer.hidden = YES; ``` ![(上拉刷新06-加载后隐藏)](http://images0.cnblogs.com/blog2015/497279/201506/141205343481821.gif) -## The pull to refresh 07-Automatic back of the pull01 +## The pull to refresh 07-Automatic back of the pull01 ```objc self.tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; ``` ![(上拉刷新07-自动回弹的上拉01)](http://images0.cnblogs.com/blog2015/497279/201506/141205392239231.gif) -## The pull to refresh 08-Automatic back of the pull02 +## The pull to refresh 08-Automatic back of the pull02 ```objc MJRefreshBackGifFooter *footer = [MJRefreshBackGifFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; @@ -304,21 +304,21 @@ self.tableView.mj_footer = footer; ``` ![(上拉刷新07-自动回弹的上拉02)](http://images0.cnblogs.com/blog2015/497279/201506/141205441443628.gif) -## The pull to refresh 09-DIY the control of refresh(Automatic refresh) +## The pull to refresh 09-DIY the control of refresh(Automatic refresh) ```objc self.tableView.mj_footer = [MJDIYAutoFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; // Implementation reference to MJDIYAutoFooter.h和MJDIYAutoFooter.m ``` ![(上拉刷新09-自定义刷新控件(自动刷新))](http://images0.cnblogs.com/blog2015/497279/201506/141205500195866.gif) -## The pull to refresh 10-DIY the control of refresh(Automatic back) +## The pull to refresh 10-DIY the control of refresh(Automatic back) ```objc self.tableView.mj_footer = [MJDIYBackFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; // Implementation reference to MJDIYBackFooter.h和MJDIYBackFooter.m ``` ![(上拉刷新10-自定义刷新控件(自动回弹))](http://images0.cnblogs.com/blog2015/497279/201506/141205560666819.gif) -## UICollectionView01-The pull and drop-down refresh +## UICollectionView01-The pull and drop-down refresh ```objc // The drop-down refresh self.collectionView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ @@ -332,7 +332,7 @@ self.collectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingB ``` ![(UICollectionView01-上下拉刷新)](http://images0.cnblogs.com/blog2015/497279/201506/141206021603758.gif) -## UIWebView01-The drop-down refresh +## UIWebView01-The drop-down refresh ```objc //Add the control of The drop-down refresh self.webView.scrollView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{