From b65788bf5542ff1701ed901d7e34a9b659781cda Mon Sep 17 00:00:00 2001 From: Suric zhang <372081349@qq.com> Date: Tue, 27 Sep 2016 16:53:22 +0800 Subject: [PATCH] fix code --- DropdownMenu/DropUpMenu.swift | 8 ++++---- DropdownMenu/DropdownMenu.swift | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/DropdownMenu/DropUpMenu.swift b/DropdownMenu/DropUpMenu.swift index 5734ecc..87b1fdf 100644 --- a/DropdownMenu/DropUpMenu.swift +++ b/DropdownMenu/DropUpMenu.swift @@ -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 @@ -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 } diff --git a/DropdownMenu/DropdownMenu.swift b/DropdownMenu/DropdownMenu.swift index 00aff0d..f67a71c 100644 --- a/DropdownMenu/DropdownMenu.swift +++ b/DropdownMenu/DropdownMenu.swift @@ -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 @@ -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 }