ios - How to use a protocol to SKPSMTPMessageDelegate in Swift? -
i'm using skpsmtpmessage
send mails, when add together functions need skpsmtpmessagedelegate
. add together this:
class viewcontroller: uiviewcontroller, skpsmtpmessagedelegate
but error: type 'viewcontroller" not conform protocol 'skpsmtpmessagedelegete
'
an don't know how add together this, because need write @objc protocol ??
@objc protocol skpsmtpmessagedelegate{ //code here? }
thanks!
if you're getting message not conforming skpsmtpmessagedelegate
, doesn't mean have define protocol. means protocol defined (in skpsmtpmessage.h
) , you've failed implement messagesent
and/or messagefailed
. create sure implement both of functions in viewcontroller
class:
func messagesent(message: skpsmtpmessage!) { <#code#> } func messagefailed(message: skpsmtpmessage!, error: nserror!) { <#code#> }
ios objective-c xcode swift
No comments:
Post a Comment