[英]UITableView forced to be UITableViewStyleGrouped but still UITableViewStylePlain sometimes
I have a UITableViewController
and i use custom init methods like 我有一个UITableViewController
,我使用自定义的初始化方法,例如
-(id)initWithCustomStuff{
self = [super initWithStyle:UITableViewStyleGrouped];
if (self) {
// Custom stuff happening
}
return self;
}
And as you see, I forced the TableView
with [super initWithStyle:]
method to always be UITableViewStyleGrouped
. 如您所见,我通过[super initWithStyle:]
方法强制将TableView
始终设置为UITableViewStyleGrouped
。
Mostly i got my grouped table, but sometimes with some devices like an iPhone 5 with iOS7 and an iPad mini with 6.1.2 i got a UITableViewStylePlain
. 大多数情况下,我得到了分组表,但有时在某些设备上,例如带有iOS7的iPhone 5和带有6.1.2的iPad mini,我得到了UITableViewStylePlain
。
Note: A week ago i rebuilded this view, because before i used a UIViewController
with a UITableView
inside and other stuff, now i make it to a UITableViewController
and also i removed the .xib file and all the subviews i don't really needed. 注意:一周前,我重建了该视图,因为在我使用带有UITableView
以及其他内容的UIViewController
之前,现在我将其制作为UITableViewController
并且还删除了.xib文件和我并不是真正需要的所有子视图。
Maybe it somehow referenced to the .xib? 也许以某种方式引用了.xib? I removed it from the project and also deleted it and deleted the outdated version from the devices. 我从项目中删除了它,还删除了它,并从设备中删除了过时的版本。
After deleting the class and making a new one without a .xib file, then coping anything back to the new header and source file solved the problem. 删除该类并制作一个没有.xib文件的新类之后,然后将所有内容都回复到新的标头和源文件中即可解决该问题。 Maybe it was some random Xcode
but caused by using multiply versions of Xcode
in the same time. 也许是一些随机的Xcode
但是是由于同时使用Xcode
倍增版本引起的。 I still don't know what was the real matter. 我仍然不知道真正的问题是什么。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.