Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
Suric zhang committed Sep 27, 2016
1 parent 5729ff1 commit b65788b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions DropdownMenu/DropUpMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@ extension DropUpMenu: UITableViewDataSource {
return items.count
}

@objc(tableView:heightForRowAtIndexPath:) public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return rowHeight
}

public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if let customCell = delegate?.dropUpMenu(self, cellForRowAt: indexPath) {
return customCell
Expand Down Expand Up @@ -237,6 +233,10 @@ extension DropUpMenu: UITableViewDataSource {
}

extension DropUpMenu: UITableViewDelegate {
public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return rowHeight
}

public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return CGFloat.leastNormalMagnitude
}
Expand Down
9 changes: 4 additions & 5 deletions DropdownMenu/DropdownMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,6 @@ extension DropdownMenu: UITableViewDataSource {
return items.count
}

@objc(tableView:heightForRowAtIndexPath:)
public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return rowHeight
}

public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if let customCell = delegate?.dropdownMenu(self, cellForRowAt: indexPath) {
return customCell
Expand Down Expand Up @@ -249,6 +244,10 @@ extension DropdownMenu: UITableViewDataSource {
}

extension DropdownMenu: UITableViewDelegate {
public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return rowHeight
}

public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return CGFloat.leastNormalMagnitude
}
Expand Down

0 comments on commit b65788b

Please sign in to comment.