Swift: @discardableResult

Swift: @discardableResult

Problem?

Solution?

@discardableResult, this annotation is used to ignore the return value of the function so that you get no more warnings!

How to use it!

You only need to annotate the function with @discardableResult

Okay, but why return unused value?

Just in case!


Ali Tarek ????

Senior iOS Engineer @ Yassir

6 年

?nice one , waiting for more?

回复

要查看或添加评论,请登录

Essam Fahmy的更多文章

社区洞察

其他会员也浏览了