Skip to content

Commit

Permalink
fix public issue
Browse files Browse the repository at this point in the history
  • Loading branch information
DuckDeck committed Sep 22, 2017
1 parent b294fc4 commit 37ffdf4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions GrandMenu.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "GrandMenu"
s.version = "1.1.0"
s.version = "1.1.1"
s.summary = "GrandMenu is a powerful and simple Menu"

# This description is used to generate tags and improve search results.
Expand Down Expand Up @@ -80,7 +80,7 @@ Pod::Spec.new do |s|
# Supports git, hg, bzr, svn and HTTP.
#

s.source = { :git => "https://github.com/DuckDeck/GrandMenu.git", :tag => "1.1.0" }
s.source = { :git => "https://github.com/DuckDeck/GrandMenu.git", :tag => "1.1.1" }


# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
Expand Down
4 changes: 2 additions & 2 deletions GrandMenu/GrandBaseTable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import UIKit

class GrandBaseTable: UITableView,UIGestureRecognizerDelegate {
open class GrandBaseTable: UITableView,UIGestureRecognizerDelegate {

func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true
}
}
8 changes: 4 additions & 4 deletions GrandMenu/GrandCellTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

import UIKit

class GrandCellTableViewCell: UITableViewCell {
open class GrandCellTableViewCell: UITableViewCell {

var pageContentView:GrandPageContentView?
var vcs = [UIViewController]()
var cellCanScroll = false{
open var pageContentView:GrandPageContentView?
open var vcs = [UIViewController]()
open var cellCanScroll = false{
didSet{
for vc in vcs{
if let v = vc as? GrandContentViewController{
Expand Down
22 changes: 11 additions & 11 deletions GrandMenu/GrandContentViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,40 @@

import UIKit

class GrandContentViewController: UIViewController,UITableViewDataSource,UITableViewDelegate {
var canScroll = false;
var tableView = UITableView()
var fingerIsTouch = false
open class GrandContentViewController: UIViewController,UITableViewDataSource,UITableViewDelegate {
open var canScroll = false;
open var tableView = UITableView()
open var fingerIsTouch = false

override func viewDidLoad() {
override open func viewDidLoad() {
super.viewDidLoad()
tableView = UITableView()
tableView.dataSource = self
tableView.delegate = self
view.addSubview(tableView)
}
override func viewWillLayoutSubviews() {
override open func viewWillLayoutSubviews() {
tableView.frame = self.view.bounds
}

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 0
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
return UITableViewCell()
}


func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
public func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
fingerIsTouch = true
}

func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
public func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
fingerIsTouch = false
}

func scrollViewDidScroll(_ scrollView: UIScrollView) {
public func scrollViewDidScroll(_ scrollView: UIScrollView) {
if !canScroll{
scrollView.contentOffset = CGPoint()
}
Expand Down
16 changes: 8 additions & 8 deletions GrandMenu/GrandPageContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

import UIKit

@objc protocol GrandPageContentViewDelagate {
@objc public protocol GrandPageContentViewDelagate {
@objc optional func contentViewWillBeginDragging(contentview:GrandPageContentView)
@objc optional func contentViewDidScroll(contentview:GrandPageContentView,startIndex:CGFloat,endIndex:CGFloat,progress:CGFloat)
@objc optional func contentViewDidEndDecelerating(contentview:GrandPageContentView,startIndex:CGFloat,endIndex:CGFloat)
}

class GrandPageContentView: UIView {
open class GrandPageContentView: UIView {
let cellId = "GrandCelId"

weak open var delegate:GrandPageContentViewDelagate?
Expand Down Expand Up @@ -67,18 +67,18 @@ class GrandPageContentView: UIView {
}


required init?(coder aDecoder: NSCoder) {
required public init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

}

extension GrandPageContentView:UICollectionViewDataSource,UICollectionViewDelegate{
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.childViewController?.count ?? 0
}

func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: cellId, for: indexPath)
cell.contentView.subviews.forEach { (v) in
v.removeFromSuperview()
Expand All @@ -89,13 +89,13 @@ extension GrandPageContentView:UICollectionViewDataSource,UICollectionViewDelega
return cell
}

func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
public func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
isSelectBtn = false
startOffsetX = scrollView.contentOffset.x
delegate?.contentViewWillBeginDragging?(contentview: self)
}

func scrollViewDidScroll(_ scrollView: UIScrollView) {
public func scrollViewDidScroll(_ scrollView: UIScrollView) {
if isSelectBtn {
return
}
Expand Down Expand Up @@ -123,7 +123,7 @@ extension GrandPageContentView:UICollectionViewDataSource,UICollectionViewDelega
delegate?.contentViewDidScroll?(contentview: self, startIndex: startIndex, endIndex: endIndex, progress: progress)
}

func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
let scrollViewWidth = scrollView.bounds.size.width
let currentOffsetX = scrollView.contentOffset.x
let startIndex = floor(startOffsetX / scrollViewWidth)
Expand Down

0 comments on commit 37ffdf4

Please sign in to comment.