Skip to content

Commit

Permalink
Merge branch 'release/1.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
malcommac committed Dec 10, 2019
2 parents 9ff8ba1 + b8e3e59 commit dc86626
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/Pods
/Podfile.lock
.DS_Store
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ let allRows = scrollStack.rows
let isEmpty = scrollStack.isEmpty // true if it does not contains row
let notHiddenRows = scrollStack.rows.filter { !$0.isHidden }

// By Vibility
// By Visibility
let currentlyVisibleRows = scrollStack.visibleRows // only currently visible rows (partially or enterly)
let enterlyVisibleRows = scrollStack.enterlyVisibleRows // only enterly visible rows into the stack

Expand Down
2 changes: 1 addition & 1 deletion ScrollStackController.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ScrollStackController"
s.version = "1.0.2"
s.version = "1.0.3"
s.summary = "Create complex scrollable layout using UIViewController and simplify your code"
s.homepage = "https://github.com/malcommac/ScrollStackController"
s.license = { :type => "MIT", :file => "LICENSE" }
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion ScrollStackControllerDemo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class ViewController: UIViewController {
extension ViewController: TagsVCProtocol {

func toggleTags() {
let index = stackView.gitrowForController(tagsVC)!.index
let index = stackView.rowForController(tagsVC)!.index
tagsVC.isExpanded = !tagsVC.isExpanded
stackView.reloadRow(index: index, animated: true)
}
Expand Down
12 changes: 12 additions & 0 deletions Sources/ScrollStackController/ScrollStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,17 @@ open class ScrollStack: UIScrollView, UIScrollViewDelegate {
fatalError("Initialization from IB not supported yet!")
}

// MARK: - Set Rows

/// Remove all existing rows and setup the new rows.
///
/// - Parameter controllers: controllers to set.
@discardableResult
open func setRows(controllers: [UIViewController]) -> [ScrollStackRow] {
removeAllRows(animated: false)
return addRows(controllers: controllers)
}

// MARK: - Insert Rows
/// Insert a new row to manage passed controller instance.
///
Expand Down Expand Up @@ -615,6 +626,7 @@ open class ScrollStack: UIScrollView, UIScrollViewDelegate {

rows.forEach {
$0.askForCutomizedSizeOfContentView(animated: animated)
($0.controller as? ScrollStackContainableController)?.reloadContentFromStackView(stackView: self, row: $0, animated: animated)
}

UIView.execute(animated: animated, {
Expand Down
2 changes: 0 additions & 2 deletions Sources/ScrollStackController/ScrollStackRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,6 @@ open class ScrollStackRow: UIView, UIGestureRecognizerDelegate {
case .fitLayoutForAxis:
setupRowSizeToFitLayout()
}

customizableController.reloadContentFromStackView(stackView: stackView!, row: self, animated: animated)
}

private func setupRowToFixedValue(_ value: CGFloat) {
Expand Down

0 comments on commit dc86626

Please sign in to comment.