Skip to content

Commit

Permalink
Support #13
Browse files Browse the repository at this point in the history
Signed-off-by: wangmchn <[email protected]>
  • Loading branch information
wangmchn committed Jun 14, 2016
1 parent 5243a28 commit 397d05f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions PageController/MenuView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class MenuView: UIView, MenuItemDelegate {

}
}

public weak var leftView: UIView? {
willSet {
leftView?.removeFromSuperview()
Expand All @@ -57,6 +58,7 @@ public class MenuView: UIView, MenuItemDelegate {
resetFrames()
}
}

public weak var rightView: UIView? {
willSet {
rightView?.removeFromSuperview()
Expand All @@ -68,6 +70,7 @@ public class MenuView: UIView, MenuItemDelegate {
resetFrames()
}
}

public var contentMargin: CGFloat = 0.0 {
didSet {
guard contentView != nil else { return }
Expand Down
2 changes: 2 additions & 0 deletions PageController/PageController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ public class PageController: UIViewController, UIScrollViewDelegate, MenuViewDel
scrollView.showsVerticalScrollIndicator = false
scrollView.showsHorizontalScrollIndicator = false
scrollView.bounces = bounces
scrollView.clipsToBounds = false
view.addSubview(scrollView)
contentView = scrollView
}
Expand Down Expand Up @@ -485,6 +486,7 @@ public class PageController: UIViewController, UIScrollViewDelegate, MenuViewDel
menuView?.reload()
guard selectedIndex != 0 else { return }
menuView?.selectItemAtIndex(selectedIndex)
view.bringSubviewToFront(menuView!)
}

@objc private func growCachePolicyAfterMemoryWarning() {
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions WMPageController-Swift.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = "WMPageController-Swift"
s.version = "1.3.6"
s.version = "1.3.8"
s.summary = "An easy solution to page controllers like NetEase News.(Swift Implementation)"
s.homepage = "https://github.com/wangmchn/WMPageController-Swift"
s.license = 'MIT (LICENSE)'
s.author = { "wangmchn" => "[email protected]" }
s.source = { :git => "https://github.com/wangmchn/WMPageController-Swift.git", :tag => "1.3.6" }
s.source = { :git => "https://github.com/wangmchn/WMPageController-Swift.git", :tag => "1.3.8" }
s.platform = :ios, '8.0'

s.source_files = 'PageController', 'PageController/**/*.{swift}'
Expand Down
Binary file not shown.

0 comments on commit 397d05f

Please sign in to comment.