ios - 选择后 UITableViewCell 内容移动
<p><p>我有一个表格 View ,其中每个单元格在标签和详细标签的左侧都有一个图像,如下所示:</p>
<p> <img src="/image/4mtGh.png" alt="enter image description here"/> </p>
<p>它呈现就像它在 tableview 首次加载时应该呈现的那样,但是如果我单击单元格以导航到不同的 View 然后返回到 tableView ,图像会移动以覆盖标签的一部分,如下所示:</p>
<p> <img src="/image/VcajT.png" alt="enter image description here"/> </p>
<p>更改发生在 tableview 出现后大约一秒钟,并且仅发生在先前选择的单元格上。有谁知道是什么原因造成的?</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我遇到了同样的问题。我将自定义 UIImageView 的名称设置为 imageView,现在我将其名称更改为 mImageView 并已修复。</p>
<p>也许您应该重命名您的 imageView @IBOutlet 名称。</p>
<blockquote>
<p>Incorrect using - Not working properly</p>
</blockquote>
<pre><code>@IBOutlet var imageView: UIImageView!
</code></pre>
<blockquote>
<p>Correct Using</p>
</blockquote>
<pre><code>@IBOutlet var mImageView: UIImageView!
</code></pre>
<p>很奇怪的问题</p></p>
<p style="font-size: 20px;">关于ios - 选择后 UITableViewCell 内容移动,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/23420580/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/23420580/
</a>
</p>
页:
[1]