【发布时间】:2017-09-12 14:51:25
【问题描述】:
使用 swift 3,我的主视图中有一个 UIScrollView。我称之为“功能滚动视图”
我还为我的 UIScrollView 添加了一个自定义类,其中有一个名为 loadFeatures() 的函数
featureScrollView.swift:
class featureScrollView: UIScrollView {
public func loadFeatures () {
//Add Pictures to the UIScrollView
}
如何在主视图中的 ViewController.swift 类中存在的 UIScrollView 实例上调用 loadFeatures()?
在我的 ViewController.swift 中我只想写
scrollView.loadFeatures()
并将loadFeatures() 中的代码应用于当前屏幕上的滚动视图。我开始学习 Swift,非常感谢大家的帮助!
【问题讨论】:
标签: ios swift swift3 uiscrollview