我使用的是XLPagerTabStrip,里面有两个子视图。在子视图中,我使用showMessage函数打印错误消息的toast,但是toast没有显示在视图中。
if ( debit_amount > availBal_Amount )
{
self.showMessage("NO_SUFFICIENT_BAL", type: .error, options: [.position(.bottom),.textNumberOfLines(0)])
}这是showMessage函数:
open func showMessage(_ text: String,
type: GSMessageType,
options: [GSMessageOption]? = nil) {
GSMessage.showMessageAddedTo(text: text, type: type, options: options, inView: view, inViewController: self) }只有在XLPagerTabStrip视图中,showMessage()才不起作用。
请帮我解决这个问题。
发布于 2018-12-19 15:59:06
我使用了以下代码,消息将显示在容器视图中。为此,在viewController中创建了一个对象。
let child_3 = ChildExampleViewController(itemInfo: IndicatorInfo(title: " ACCOUNT", image: UIImage(named: "profile")))
child_3.showMessage("nemessage", type: .error)

https://stackoverflow.com/questions/53845002
复制相似问题