Skip to content

Commit

Permalink
MD + Carthage
Browse files Browse the repository at this point in the history
1.修改MD
2.支持Carthage
3.完善contentInset的设置
  • Loading branch information
520dev committed Sep 28, 2017
1 parent 4590486 commit 5716324
Show file tree
Hide file tree
Showing 9 changed files with 433 additions and 47 deletions.
2 changes: 1 addition & 1 deletion MJRefresh.podspec
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
3 changes: 2 additions & 1 deletion MJRefresh/Base/MJRefreshComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion MJRefresh/Base/MJRefreshComponent.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
10 changes: 10 additions & 0 deletions MJRefresh/UIScrollView+MJExtension.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down
250 changes: 250 additions & 0 deletions MJRefreshExample.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D9DF4511F7CE29B0042D6DD"
BuildableName = "MJRefreshFramework.framework"
BlueprintName = "MJRefreshFramework"
ReferencedContainer = "container:MJRefreshExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D9DF4511F7CE29B0042D6DD"
BuildableName = "MJRefreshFramework.framework"
BlueprintName = "MJRefreshFramework"
ReferencedContainer = "container:MJRefreshExample.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D9DF4511F7CE29B0042D6DD"
BuildableName = "MJRefreshFramework.framework"
BlueprintName = "MJRefreshFramework"
ReferencedContainer = "container:MJRefreshExample.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
24 changes: 24 additions & 0 deletions MJRefreshFramework/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
19 changes: 19 additions & 0 deletions MJRefreshFramework/MJRefreshFramework.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// MJRefreshFramework.h
// MJRefreshFramework
//
// Created by MJ Lee on 2017/9/28.
// Copyright © 2017年 小码哥. All rights reserved.
//

#import <UIKit/UIKit.h>

//! 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 <MJRefreshFramework/PublicHeader.h>


Loading

0 comments on commit 5716324

Please sign in to comment.