Skip to content

Commit 2fbe2b7

Browse files
author
jiaxiang.tan
committed
delete performBatchUpdates
modified: Example/JXBanner.xcodeproj/project.pbxproj modified: Example/JXBanner/Demo/JXCustomVC.swift modified: JXBanner.podspec modified: JXBanner/Classes/Banner/Banner/JXBanner.swift modified: ReleaseNote.md
1 parent cdc8871 commit 2fbe2b7

File tree

5 files changed

+21
-6
lines changed

5 files changed

+21
-6
lines changed

Example/JXBanner.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
6E07819923D5B13100FE8C60 /* JXMiddleTargetVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E07819823D5B13100FE8C60 /* JXMiddleTargetVC.swift */; };
4646
6E07819E23D5B17300FE8C60 /* JXMiddleTargetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E07819C23D5B17300FE8C60 /* JXMiddleTargetCell.swift */; };
4747
6E07819F23D5B17300FE8C60 /* JXMiddleTargetCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6E07819D23D5B17300FE8C60 /* JXMiddleTargetCell.xib */; };
48+
6ED96CCF26B2816300A186BB /* ReleaseNote.md in Resources */ = {isa = PBXBuildFile; fileRef = 6ED96CCE26B2816300A186BB /* ReleaseNote.md */; };
4849
/* End PBXBuildFile section */
4950

5051
/* Begin PBXContainerItemProxy section */
@@ -101,6 +102,7 @@
101102
6E07819823D5B13100FE8C60 /* JXMiddleTargetVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JXMiddleTargetVC.swift; sourceTree = "<group>"; };
102103
6E07819C23D5B17300FE8C60 /* JXMiddleTargetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JXMiddleTargetCell.swift; sourceTree = "<group>"; };
103104
6E07819D23D5B17300FE8C60 /* JXMiddleTargetCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = JXMiddleTargetCell.xib; sourceTree = "<group>"; };
105+
6ED96CCE26B2816300A186BB /* ReleaseNote.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = ReleaseNote.md; path = ../ReleaseNote.md; sourceTree = "<group>"; };
104106
86DD0217E9DE21DAB1A6418E /* JXBanner.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = JXBanner.podspec; path = ../JXBanner.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
105107
A8BAC75A289C5E5883552C0B /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
106108
B37FA8DFCA403B9BCA5A97D5 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
@@ -231,6 +233,7 @@
231233
607FACF51AFB993E008FA782 /* Podspec Metadata */ = {
232234
isa = PBXGroup;
233235
children = (
236+
6ED96CCE26B2816300A186BB /* ReleaseNote.md */,
234237
86DD0217E9DE21DAB1A6418E /* JXBanner.podspec */,
235238
A8BAC75A289C5E5883552C0B /* README.md */,
236239
B37FA8DFCA403B9BCA5A97D5 /* LICENSE */,
@@ -390,6 +393,7 @@
390393
6E07819F23D5B17300FE8C60 /* JXMiddleTargetCell.xib in Resources */,
391394
1F41C64B2331D9AD00B83DC4 /* 11.jpg in Resources */,
392395
6E06070F24174BBC00260BD9 /* mp4_1.jpg in Resources */,
396+
6ED96CCF26B2816300A186BB /* ReleaseNote.md in Resources */,
393397
1F41C6482331D9AD00B83DC4 /* 12.jpg in Resources */,
394398
1F41C6492331D9AD00B83DC4 /* 9.jpg in Resources */,
395399
6E06070E24174BBC00260BD9 /* mp4_4.jpg in Resources */,

Example/JXBanner/Demo/JXCustomVC.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ class JXCustomVC: UIViewController {
7272
}
7373

7474
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
75-
linearBanner.scrollToIndex(3, animated: false)
75+
// linearBanner.scrollToIndex(3, animated: false)
76+
pageCount = 1
77+
converflowBanner.reloadView()
78+
linearBanner.reloadView()
79+
customBanner.reloadView()
7680
}
7781

7882
deinit {

JXBanner.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'JXBanner'
11-
s.version = '0.3.4'
11+
s.version = '0.3.5'
1212
s.summary = 'A multifunctional framework for banner unlimited rollover diagrams'
1313

1414
# This description is used to generate tags and improve search results.

JXBanner/Classes/Banner/Banner/JXBanner.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ extension JXBanner {
180180
params.cycleWay = .skipEnd
181181
}
182182
placeholderImgView.isHidden = pageCount > 0
183-
collectionView.performBatchUpdates {[weak self] in
184-
self?.collectionView.reloadData()
185-
} completion: { [weak self] _ in
186-
self?.reinitializeIndexPath()
183+
collectionView.reloadData()
184+
collectionView.layoutIfNeeded()
185+
DispatchQueue.main.async {
186+
self.reinitializeIndexPath()
187187
}
188188
}
189189

ReleaseNote.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@
66
* **commit**: `f294d0ae68d7c`
77
* **主要更新**
88
* 修复:在系统版本低的设备上会触发闪退的情况。(断点分析为collectionView未刷新完成,调用scrollToItem导致。)
9+
10+
## 0.3.5
11+
* **日期**:2020-07-29
12+
* **tag**: 0.3.5
13+
* **commit**: `f294d0ae68d7c`
14+
* **主要更新**
15+
* 修复:使用performBatchUpdates获取刷新结束方式出现崩溃。

0 commit comments

Comments
 (0)