gpt4 book ai didi

ios - 6+ 的 UITableViewCell 中的不同缩进值?

转载 作者:行者123 更新时间:2023-11-29 12:35:16 27 4
gpt4 key购买 nike

我将 UITextField 放在 UITableViewCell 中并匹配其余行的缩进,我将 x 设置为 15(据我所知这是默认缩进?)。它看起来不错,与 5s/6 上的其余单元格匹配,但在 6+ 上,我看到了不同的结果。 6+ 有不同的默认设置吗?我在这里遗漏了什么吗?

On the 6

On the 6+

最佳答案

- (NSInteger)tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath
{

// yoy would be trying

return 15

// try this... adjust some value other than 15 if doesnt work in 6+

return self.view.frame.origin.x+15;
}

关于ios - 6+ 的 UITableViewCell 中的不同缩进值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26541216/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com