ios - SWRevealViewController 右侧菜单

标签 ios objective-c uitableview

我正在尝试将 UITableView 插入位于 https://github.com/John-Lluch/SWRevealViewController/tree/master/RevealControllerExample 的第一个示例的 RightViewController 中.

问题是表格最左对齐并且每个单元格中的文本被截断。

有什么可能的修复方法?我查看了 SWRevealViewController api,但找不到解决方案。此外,我查看了 UITableView api 并尝试了每个可能的对齐设置,也在 xib 构建器中。似乎没有改变文本的截断

我附上了下面的图片。请注意左对齐的表格。

right side controller
(来源:jeffcoat.net)

最佳答案

使用下行将 0 分配给 SWRevealViewController 的 _rightViewRevealOverdraw 属性

self.revealViewController.rightViewRevealOverdraw = 0.0f;

或者

SWRevealViewController.m 文件中搜索行

_rightViewRevealOverdraw = 60.0f;

然后改变它

_rightViewRevealOverdraw = 0.0f;

这将解决您的问题。

更好的解决方案是在 Controller 而不是库中写在单行下面。

  self.revealViewController.rightViewRevealOverdraw = 0.0f;

关于ios - SWRevealViewController 右侧菜单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19843773/

相关文章:

ios - scrollViewDidScroll 在设置表偏移后被调用 "twice"

ios - 如何在 iOS 7 上将状态栏内容颜色设置为白色

iphone - 内存泄漏问题

ios - Appcelerator IOS模块开发

ios - iPad详细设置页面,如弹出viewController

objective-c - swift : Define a closure compatible with Objective-C block

ios - drawViewHierarchyInRect :afterScreenUpdates: delays other animations

objective-c - 使用 NSURL 设置和获取 kIsStationary 位

swift - 如何调用 UITableViewCell 内部的 textField (swift)

ios - indexPathForSelectedRow() 的问题,返回不正确的索引。使用 swift