Skip to content

Commit

Permalink
3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
linhay committed Apr 23, 2019
1 parent 80cbe87 commit 5eac6ba
Show file tree
Hide file tree
Showing 11 changed files with 316 additions and 314 deletions.
2 changes: 1 addition & 1 deletion EmptyPage.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'EmptyPage'
s.version = '3.0.0'
s.version = '3.1.0'
s.summary = 'iOS - 轻量级空白页占位图框架...'

s.homepage = 'https://github.com/linhay/EmptyPage'
Expand Down
4 changes: 4 additions & 0 deletions Example/EmptyPage.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
CD056F2F21D0E78200A7F94A /* AutoLayoutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD056F2E21D0E78200A7F94A /* AutoLayoutViewController.swift */; };
CD056F3121D0E78F00A7F94A /* AutoLayoutViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD056F3021D0E78F00A7F94A /* AutoLayoutViewController.storyboard */; };
CD11E2162175C9FF00838D84 /* document.sh in Resources */ = {isa = PBXBuildFile; fileRef = CD11E2152175C9FF00838D84 /* document.sh */; };
CD5ECAD6226EE63D0075CBD5 /* .travis.yml in Resources */ = {isa = PBXBuildFile; fileRef = CD5ECAD5226EE63D0075CBD5 /* .travis.yml */; };
CDA25D572009A7BD003C0E7E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CDA25D562009A7BD003C0E7E /* Images.xcassets */; };
CDA25D5D2009E54F003C0E7E /* EmptyStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA25D5C2009E54F003C0E7E /* EmptyStore.swift */; };
CDC946FE22017D6A0037F305 /* DZIndexViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC946FC22017D6A0037F305 /* DZIndexViewController.swift */; };
Expand Down Expand Up @@ -45,6 +46,7 @@
CD056F2E21D0E78200A7F94A /* AutoLayoutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoLayoutViewController.swift; sourceTree = "<group>"; };
CD056F3021D0E78F00A7F94A /* AutoLayoutViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = AutoLayoutViewController.storyboard; sourceTree = "<group>"; };
CD11E2152175C9FF00838D84 /* document.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = document.sh; path = ../document.sh; sourceTree = "<group>"; };
CD5ECAD5226EE63D0075CBD5 /* .travis.yml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = .travis.yml; path = ../.travis.yml; sourceTree = "<group>"; };
CDA25D562009A7BD003C0E7E /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
CDA25D5C2009E54F003C0E7E /* EmptyStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyStore.swift; sourceTree = "<group>"; };
CDC946FC22017D6A0037F305 /* DZIndexViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DZIndexViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -118,6 +120,7 @@
607FACF51AFB993E008FA782 /* Podspec Metadata */ = {
isa = PBXGroup;
children = (
CD5ECAD5226EE63D0075CBD5 /* .travis.yml */,
CD11E2152175C9FF00838D84 /* document.sh */,
72069FE43CCD8BD2766D9ED7 /* EmptyPage.podspec */,
A8187284C2035D73F1FEC286 /* README.md */,
Expand Down Expand Up @@ -231,6 +234,7 @@
CDA25D572009A7BD003C0E7E /* Images.xcassets in Resources */,
CD11E2162175C9FF00838D84 /* document.sh in Resources */,
CD056F3121D0E78F00A7F94A /* AutoLayoutViewController.storyboard in Resources */,
CD5ECAD6226EE63D0075CBD5 /* .travis.yml in Resources */,
9D9EB3932008853E002264E7 /* EmptyPageForCustom.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
6 changes: 3 additions & 3 deletions Example/EmptyPage/AutoLayoutViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,23 @@ class AutoLayoutViewController: UIViewController {
onlyTextView.removeFromSuperview()
onlyImageView.removeFromSuperview()
standardView.removeFromSuperview()
tableView.setEmpty(standardView)
tableView.ep.setEmpty(standardView.mix())
tableView.reloadData()
}

@IBAction func setImageStyleEvent(_ sender: UIButton) {
onlyTextView.removeFromSuperview()
onlyImageView.removeFromSuperview()
standardView.removeFromSuperview()
tableView.setEmpty(onlyImageView)
tableView.ep.setEmpty(onlyImageView.mix())
tableView.reloadData()
}

@IBAction func setTextStyleEvent(_ sender: UIButton) {
onlyTextView.removeFromSuperview()
onlyImageView.removeFromSuperview()
standardView.removeFromSuperview()
tableView.setEmpty(onlyTextView)
tableView.ep.setEmpty(onlyTextView.mix())
tableView.reloadData()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DZDetailViewController: UITableViewController {
}

func config(emptyPage: EmptyPageView) {
tableView.setEmpty(emptyPage)
tableView.ep.setEmpty(emptyPage)
}

}
4 changes: 2 additions & 2 deletions Example/EmptyPage/Demos/DemoCollectionViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ class DemoCollectionViewController: UIViewController,UICollectionViewDelegate,UI
}

func getData() {
collectionView.setEmpty(EmptyStore.loading)
collectionView.ep.setEmpty(EmptyStore.loading)
collectionView.reloadData()
rows = 0
sleep(3) {[weak self] in
guard let base = self else { return }
base.collectionView.setEmpty(EmptyStore.custom(block1: base.event1(), block2: base.event2()))
base.collectionView.ep.setEmpty(EmptyStore.custom(block1: base.event1(), block2: base.event2()))
base.collectionView.reloadData()
}
}
Expand Down
4 changes: 2 additions & 2 deletions Example/EmptyPage/Demos/DemoScrollViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class DemoScrollViewController: UIViewController {
sleep(3) {
self.itemView.removeFromSuperview()
sleep(3, mainCall: {
self.scrollView.setEmpty(EmptyStore.custom(block1: {
self.scrollView.ep.setEmpty(EmptyStore.custom(block1: {

}, block2: {

Expand Down Expand Up @@ -59,7 +59,7 @@ extension DemoScrollViewController {
}

private func buildSubView() {
scrollView.setEmpty(EmptyStore.loading)
scrollView.ep.setEmpty(EmptyStore.loading)
scrollView.contentSize = view.bounds.size
scrollView.showsVerticalScrollIndicator = false
scrollView.showsHorizontalScrollIndicator = false
Expand Down
6 changes: 3 additions & 3 deletions Example/EmptyPage/Demos/DemoTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DemoTableViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
tableView.separatorStyle = .none
tableView.setEmpty(EmptyStore.loading)
tableView.ep.setEmpty(EmptyStore.loading)
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "reuseIdentifier")
getData()
}
Expand All @@ -35,11 +35,11 @@ class DemoTableViewController: UITableViewController {
}

func getData() {
tableView.setEmpty(EmptyStore.loading)
tableView.ep.setEmpty(EmptyStore.loading)
tableView.reloadData()
sleep(3) {[weak self] in
guard let base = self else { return }
base.tableView.setEmpty(EmptyStore.custom(block1: base.event1(), block2: base.event2()))
base.tableView.ep.setEmpty(EmptyStore.custom(block1: base.event1(), block2: base.event2()))
base.tableView.reloadData()
}
}
Expand Down
Loading

0 comments on commit 5eac6ba

Please sign in to comment.