ios - 更改 UITableViewCellEditingStyleDelete 的图像
<p><p>谁知道UITable单元格减号按钮的背景图片怎么改,</p>
<p> <img src="/image/zAePr.png" alt="enter image description here"/> </p>
<p>我需要更改此按钮 <img src="/image/qfG1X.png" alt="enter image description here"/>类似于 <img src="/image/bkCYX.png" alt="enter image description here"/> </p>
<p>因为如果你在 iOS6 和 iOS7 之间切换,这个按钮就会改变。</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>希望对你有帮助</p>
<pre><code>- (void)willTransitionToState:(UITableViewCellStateMask)state
{
;
if ((state & UITableViewCellStateShowingDeleteConfirmationMask) == UITableViewCellStateShowingDeleteConfirmationMask)
{
for (UIView *subview in self.subviews)
{
if () isEqualToString:@"UITableViewCellDeleteConfirmationControl"])
{
UIImageView *deleteBtn = [initWithFrame:CGRectMake(0, 0, 64, 33)];
];
[ addSubview:deleteBtn];
}
}
}
}
</code></pre></p>
<p style="font-size: 20px;">关于ios - 更改 UITableViewCellEditingStyleDelete 的图像,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/22916301/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/22916301/
</a>
</p>
页:
[1]