How to Toast message in Swift?

后端 未结 22 1189
暖寄归人
暖寄归人 2020-12-22 19:18

Is there any way to Toast message in swift ?

I have tried in objective c but could not find solution in swift.

[self.view makeToast:@\"Account create         


        
22条回答
  •  情书的邮戳
    2020-12-22 19:39

    if makeToast:duration:position: is defined in objective-c and can be called, then the swift code will be

    self.view.makeToast("Acount created Successfully", duration: 0.5, position: "bottom")
    

    You may need to use a bridging header to gain access to those method in your swift code though.

提交回复
热议问题