Skip to content

Commit 2c46818

Browse files
committed
add 2.5.0 version
1 parent 1198ddb commit 2c46818

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

.clang-format

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
BasedOnStyle: LLVM
2+
IndentWidth: 4
3+
UseTab: Never
4+
5+
---
6+
Language: Cpp
7+
# Force Cpp style
8+
9+
ColumnLimit: 120
10+
MaxEmptyLinesToKeep: 1
11+
IndentCaseLabels: true
12+
13+
BreakBeforeBraces: Linux
14+
BreakBeforeTernaryOperators: true
15+
BreakConstructorInitializersBeforeComma: true
16+
17+
AllowShortIfStatementsOnASingleLine: false
18+
AllowShortFunctionsOnASingleLine: false
19+
AllowShortBlocksOnASingleLine: false
20+
AllowShortLoopsOnASingleLine: false
21+
AllowShortCaseLabelsOnASingleLine: false
22+
23+
PointerAlignment: Right
24+
25+
ObjCSpaceAfterProperty: true
26+
ObjCSpaceBeforeProtocolList: true
27+
28+
SpaceBeforeParens: ControlStatements
29+
SpacesInParentheses: false
30+
SpacesInContainerLiterals: true
31+
SpaceInEmptyParentheses: false
32+
---

Source/YAInfiniteScroll/YAInfiniteScroll.m

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,23 @@ - (instancetype)initWithScrollView:(UIScrollView *)scrollView
3535
self = [self init];
3636
if (self) {
3737
_scrollView = scrollView;
38+
39+
[_scrollView addObserver:self forKeyPath:@"contentSize" options:NSKeyValueObservingOptionNew context:NULL];
3840
}
3941
return self;
4042
}
4143

44+
- (void)dealloc
45+
{
46+
@try {
47+
[_scrollView removeObserver:self forKeyPath:@"contentSize" context:NULL];
48+
}
49+
@catch (NSException *exception)
50+
{
51+
NSLog(@"%@", exception);
52+
}
53+
}
54+
4255
#pragma mark - Property
4356

4457
- (void)setLoadMoreFooterView:(UIView *)loadMoreFooterView
@@ -77,7 +90,7 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView
7790
if (_bottomStick && self.loadingMore == NO) {
7891
[self.loadMoreFooterView setFrameOriginY:MAX(scrollView.contentSize.height,
7992
scrollView.contentOffset.y + CGRectGetHeight(scrollView.bounds) -
80-
self.loadMoreFooterView.bounds.size.height)];
93+
self.loadMoreFooterView.bounds.size.height)];
8194
} else {
8295
[self.loadMoreFooterView setFrameOriginY:scrollView.contentSize.height];
8396
}

YAUIKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'YAUIKit'
4-
s.version = '2.4.5'
4+
s.version = '2.5.0'
55
s.summary = 'YAUIKit'
66
s.homepage = 'https://github.com/candyan/YAUIKit'
77
s.license = 'MIT'

0 commit comments

Comments
 (0)