UITableView在iOS 7上使用不规则线条绘制:

怎么解决?单元格之间的线应位于屏幕的整个宽度上.
所以我有一个UITableView,其中分隔符没有全宽.它在左侧前10像素结束.我在viewDidLoad中玩这个代码
self.tableView.layoutMargins = UIEdgeInsetsZero;
Run Code Online (Sandbox Code Playgroud)
也可以在故事板中选择自定义或默认选择器.现在,所有填充的单元格都没有全宽度选择器,但是空单元格具有全宽度.
我怎么能解决这个问题呢?
谢谢你的帮助
我在XCode 6 GM 上UITableView为iPhone 6模拟器(iOS 8)找到了一个奇怪的白色空间.我试图设置SeparatorInset故事板和代码,但白色空间直到那里.
以下代码适用于iOS 7,但不适用于iOS 8(iPhone 6模拟器).
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) {
[tableView setSeparatorInset:UIEdgeInsetsZero];
}
}
Run Code Online (Sandbox Code Playgroud)
我附上下面的屏幕截图:

我顺便使用AutoLayout.我希望有人可以告诉我一种方法来消除奇怪的白色空间TableView.
我有之间的分隔符的问题UITableViewCell以s UITableView上iOS 9.它们具有显着的左边距.我已经有了删除引入的间距的代码,iOS 8但它无法使用iOS 9.看起来他们添加了别的东西.我想它可能与layoutMarginsGuide有关,但我还没想到它.有没有人有类似的问题,并找到了解决方案?
我有一个关于UITableView的问题...我有一个UITableViewController,我创建了一个自定义单元格.当我可视化tableView时,我会在分隔线之前看到一个小空格,您可以在此屏幕截图中看到:

为什么?这是默认的可视化?我可以更改一些东西来移除这个白色的左边填充物吗?
我ViewCell用来在表格设置页面中创建行.我有一个选择Light或Dark主题的设置.
<ViewCell Height="50">
<StackLayout x:Name="darkTheme" VerticalOptions="FillAndExpand" Padding="20,0,20,0">
<StackLayout Orientation="Horizontal" VerticalOptions="CenterAndExpand">
<Label Text="Dark" XAlign="Center" FontSize="15"/>
<Label x:Name="darkThemeCheckmark" Text="{x:Static local:FontAwesome.FACheck}" FontFamily="FontAwesome" XAlign="Center" IsVisible="false" FontSize="12" HorizontalOptions="EndAndExpand"/
</StackLayout>
</StackLayout>
</ViewCell>
<ViewCell Height="50">
<StackLayout x:Name="lightTheme" VerticalOptions="FillAndExpand" Padding="20,0,20,0">
<StackLayout Orientation="Horizontal" VerticalOptions="CenterAndExpand">
<Label Text="Light" XAlign="Center" FontSize="15"/>
<Label x:Name="lightThemeCheckmark" Text="{x:Static local:FontAwesome.FACheck}" FontFamily="FontAwesome" XAlign="Center" IsVisible="false" FontSize="12"/>
</StackLayout>
</StackLayout>
</ViewCell>
Run Code Online (Sandbox Code Playgroud)
每当我从暗到主题切换时,我的行之间的左侧有微弱的光线,我似乎无法摆脱它.请参考下图:
在我的渲染器中,我设置了以下内容:
tableView.LayoutMargins = new UIEdgeInsets() { Left = 20 };
cell.SeparatorInset = new UIEdgeInsets() { Left = 20 };
cell.LayoutMargins = new UIEdgeInsets() { Left = 20 …Run Code Online (Sandbox Code Playgroud) 我已经实现UITableView了编码.我也定了UITableViewCellSeparatorStyleNone.它隐藏在iOS8及以下版本中,但不会隐藏在iOS9 Beta版本中.
我们有许多表格视图(使用Xamarin Monotouch对话框),它们是普通的(未分组),设计为全宽而不缩进.这一切在iOS 7中运行良好.虽然使用iOS 8模拟器,我们得到一个轻微的左缩进.
iOS 8有一个名为LayoutMargins的新属性.我们将该属性设置为零.像这样:
if (this.TableView.RespondsToSelector(new Selector("setSeparatorInset:")))
this.TableView.SeparatorInset = UIEdgeInsets.Zero;
if (this.TableView.RespondsToSelector(new Selector("setLayoutMargins:")))
this.TableView.LayoutMargins = UIEdgeInsets.Zero;
Run Code Online (Sandbox Code Playgroud)
这有一些影响 - 它删除了大约一半的缩进.但我们仍然看到一个轻微的缩进.是否有另一个属性控制iOS 8中的缩进?
这是截图...

我发现了一些问题和答案,以删除ios7中UITableViews的偏移量,即这一个 如何在iOS 7上修复UITableView分隔符?
我想知道是否有人遇到了正确的功能来删除插入边距.在objective-c中类似于这个答案的东西
if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) {
[tableView setSeparatorInset:UIEdgeInsetsZero];
}
Run Code Online (Sandbox Code Playgroud) 在Xcode 6中,当我尝试将图像视图固定到边缘时UICollectionViewCell,自动布局会创建-8.0的约束.改变了什么?我试图找到发行说明或文档更新,但没有看到任何东西.



为什么会发生这种情况?边缘到边缘内容的首选方法是什么?
ios ×7
uitableview ×7
iphone ×4
ios8 ×3
c# ×2
ios9 ×2
xamarin.ios ×2
xcode6 ×2
autolayout ×1
ios7 ×1
ipad ×1
objective-c ×1
swift ×1
uikit ×1
xamarin ×1
xcode7 ×1