是否可以从笔尖访问UITableView的ScrollView代码? [英] Is it possible to access a UITableView's ScrollView In Code From A Nib?

查看:154
本文介绍了是否可以从笔尖访问UITableView的ScrollView代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我在FlipsideView笔尖中创建一个UITableView。我似乎无法从界面构建器中更改表视图的背景。我可以通过创建一个插座然后设置背景来解决这个问题。但是,我想给滚动视图圆角以创建类似于iPhone天气/股票应用程序表视图的外观。有没有办法在代码中访问滚动视图的属性,以便我可以设置圆角?

Right now I am creating a UITableView in a FlipsideView nib. I don't seem to be able to change the background of the table view from within interface builder. I can fix this by creating an outlet and then setting the background. However, I want to give the scroll view rounded corners in order to create a look similar to the iPhone weather/stock app table views. Is there a way to access the scroll view's property in code so that I can set the rounded corners?

推荐答案

A UITableView 没有 UIScrollView UIScrollView 。 UITableView是UIScrollView的子类,可以看作文档。您可以通过表视图直接访问要访问的 UIScrollView 的任何功能属性。

A UITableView doesn't have a UIScrollView, it is a UIScrollView. UITableView is a subclass of UIScrollView as can be seen it the documentation. Any properties of functionality of UIScrollView you want to access can be directly accessed via the table view.

同样, UITableViewDelegate s都是 UIScrollViewDelegate s。

这篇关于是否可以从笔尖访问UITableView的ScrollView代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆