<small id='0uryO'></small><noframes id='0uryO'>

      1. <legend id='0uryO'><style id='0uryO'><dir id='0uryO'><q id='0uryO'></q></dir></style></legend>
        <i id='0uryO'><tr id='0uryO'><dt id='0uryO'><q id='0uryO'><span id='0uryO'><b id='0uryO'><form id='0uryO'><ins id='0uryO'></ins><ul id='0uryO'></ul><sub id='0uryO'></sub></form><legend id='0uryO'></legend><bdo id='0uryO'><pre id='0uryO'><center id='0uryO'></center></pre></bdo></b><th id='0uryO'></th></span></q></dt></tr></i><div id='0uryO'><tfoot id='0uryO'></tfoot><dl id='0uryO'><fieldset id='0uryO'></fieldset></dl></div>

        • <bdo id='0uryO'></bdo><ul id='0uryO'></ul>
        <tfoot id='0uryO'></tfoot>

        无法转换类型 '() -&gt; 的值_' 指定类型 UIImageView

        Cannot convert value of type #39;() -gt; _#39; to specified type UIImageView(无法转换类型 () -gt; 的值_ 指定类型 UIImageView)
          <tbody id='ujH0s'></tbody>

        <small id='ujH0s'></small><noframes id='ujH0s'>

          1. <i id='ujH0s'><tr id='ujH0s'><dt id='ujH0s'><q id='ujH0s'><span id='ujH0s'><b id='ujH0s'><form id='ujH0s'><ins id='ujH0s'></ins><ul id='ujH0s'></ul><sub id='ujH0s'></sub></form><legend id='ujH0s'></legend><bdo id='ujH0s'><pre id='ujH0s'><center id='ujH0s'></center></pre></bdo></b><th id='ujH0s'></th></span></q></dt></tr></i><div id='ujH0s'><tfoot id='ujH0s'></tfoot><dl id='ujH0s'><fieldset id='ujH0s'></fieldset></dl></div>
              <tfoot id='ujH0s'></tfoot>

                  <bdo id='ujH0s'></bdo><ul id='ujH0s'></ul>

                  <legend id='ujH0s'><style id='ujH0s'><dir id='ujH0s'><q id='ujH0s'></q></dir></style></legend>
                • 本文介绍了无法转换类型 '() -&gt; 的值_' 指定类型 UIImageView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试使 UIImage 视图可点击,但我没有运气.完成这项任务的最佳方法是什么?我得到的错误是无法将类型 '() -> _' 的值转换为指定类型 'UIImageView'".

                  I am trying to make a UIImage view clickable, but I am having no luck. What is the best way to complete this task? The error I am getting is "Cannot convert value of type '() -> _' to specified type 'UIImageView'".

                  lazy var profileImageView: UIImageView = {
                       let imageView = UIImageView()
                       imageView.image = UIImage(named: "ic_file_upload_white_48pt")
                       imageView.translatesAutoresizingMaskIntoConstraints = false
                       imageView.contentMode = .scaleAspectFill
                  
                       imageView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleSelectorProfileImage)))
                       imageView.isUserInteractionEnabled = true
                       return imageView
                   }
                  

                  推荐答案

                  好像是语法问题,试试

                  func profileImageView() -> UIImageView {
                          let imageView = UIImageView()
                          imageView.image = UIImage(named: "ic_file_upload_white_48pt")
                          imageView.translatesAutoresizingMaskIntoConstraints = false
                          imageView.contentMode = .scaleAspectFill
                  
                          imageView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleSelectorProfileImage)))
                          imageView.isUserInteractionEnabled = true
                          return imageView
                  }
                  

                  这篇关于无法转换类型 '() -&gt; 的值_' 指定类型 UIImageView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  what#39;s property copy means in Cocoa#39;s Framework?(like UITabBar#39;s items property)(Cocoa 框架中的属性副本是什么意思?(如 UITabBar 的 items 属性))
                  Can`t copy file from bundle to documents directory in iOS(无法将文件从捆绑包复制到 iOS 中的文档目录)
                  How to copy a quot;Dictionaryquot; in Swift?(如何复制“字典在斯威夫特?)
                  Automatically copy property values from one object to another of a different type but the same protocol (Objective-C)(自动将属性值从一个对象复制到另一个类型不同但协议相同的对象 (Objective-C))
                  Copy text to clipboard with iOS(使用 iOS 将文本复制到剪贴板)
                  Swift - How to mutate a struct object when iterating over it(Swift - 迭代结构对象时如何对其进行变异)
                    <bdo id='Nx3gR'></bdo><ul id='Nx3gR'></ul>

                    <legend id='Nx3gR'><style id='Nx3gR'><dir id='Nx3gR'><q id='Nx3gR'></q></dir></style></legend>
                  • <i id='Nx3gR'><tr id='Nx3gR'><dt id='Nx3gR'><q id='Nx3gR'><span id='Nx3gR'><b id='Nx3gR'><form id='Nx3gR'><ins id='Nx3gR'></ins><ul id='Nx3gR'></ul><sub id='Nx3gR'></sub></form><legend id='Nx3gR'></legend><bdo id='Nx3gR'><pre id='Nx3gR'><center id='Nx3gR'></center></pre></bdo></b><th id='Nx3gR'></th></span></q></dt></tr></i><div id='Nx3gR'><tfoot id='Nx3gR'></tfoot><dl id='Nx3gR'><fieldset id='Nx3gR'></fieldset></dl></div>

                    <tfoot id='Nx3gR'></tfoot>
                      1. <small id='Nx3gR'></small><noframes id='Nx3gR'>

                          <tbody id='Nx3gR'></tbody>