简体   繁体   English

如何在Swift中初始化UIView?

[英]How to initialize UIView in Swift?

I want to just initialize UIView for table footer in swift like in objective c 我只想像目标C中一样快速为表脚初始化UIView

_searchTableView.tableFooterView =[[UIView alloc] init];

to remove tableview separator lines How to do that ? 删除tableview分隔线该怎么做?

Oh just end up by. 哦,最后结束。

_searchTableView.tableFooterView = UIView()

With frame 带框架

 _searchTableView.tableFooterView  = UIView (frame: CGRectMake(0, 0, 0, 0))

You can initialize by following ways. 您可以通过以下方式进行initialize

1)Without Frame 1)无框

self.searchTableView.tableFooterView = UIView () 

2) With Frame. 2)带框架。

self.searchTableView.tableFooterView = UIView (frame: CGRectMake(10, 10, 10, 10))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM