Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Sources/EasyTipView/EasyTipView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,13 @@ public extension EasyTipView {
- parameter preferences: The preferences which will configure the EasyTipView.
- parameter delegate: The delegate.
*/
class func show(animated: Bool = true, forItem item: UIBarItem, withinSuperview superview: UIView? = nil, contentView: UIView, preferences: Preferences = EasyTipView.globalPreferences, delegate: EasyTipViewDelegate? = nil){
class func show(animated: Bool = true, forItem item: UIBarItem, withinSuperview superview: UIView? = nil, contentView: UIView, preferences: Preferences = EasyTipView.globalPreferences, delegate: EasyTipViewDelegate? = nil) -> EasyTipView? {

if let view = item.view {
show(animated: animated, forView: view, withinSuperview: superview, contentView: contentView, preferences: preferences, delegate: delegate)
let ev = show(animated: animated, forView: view, withinSuperview: superview, contentView: contentView, preferences: preferences, delegate: delegate)
return ev
}
return nil
}

/**
Expand All @@ -96,10 +98,11 @@ public extension EasyTipView {
- parameter preferences: The preferences which will configure the EasyTipView.
- parameter delegate: The delegate.
*/
class func show(animated: Bool = true, forView view: UIView, withinSuperview superview: UIView? = nil, contentView: UIView, preferences: Preferences = EasyTipView.globalPreferences, delegate: EasyTipViewDelegate? = nil){
class func show(animated: Bool = true, forView view: UIView, withinSuperview superview: UIView? = nil, contentView: UIView, preferences: Preferences = EasyTipView.globalPreferences, delegate: EasyTipViewDelegate? = nil) -> EasyTipView {

let ev = EasyTipView(contentView: contentView, preferences: preferences, delegate: delegate)
ev.show(animated: animated, forView: view, withinSuperview: superview)
return ev
}

/**
Expand Down