Swift 3: Expression implicitly coerced from 'UIView?' to Any

前端 未结 4 1008
既然无缘
既然无缘 2020-12-05 03:47

Someone else must have received this message while (or after) converting an iOS project to Swift 3, yet when I do a Google search, I get no relevant results.

Anyway,

4条回答
  •  盖世英雄少女心
    2020-12-05 04:27

    Problem

    The expected type is Any but the type provided was UIView?

    The problem is with the optional, just make sure an instance of UIView is passed and things would work.

提交回复
热议问题