我正在使用segmentio pod 来分割图像和文本,我在项目中添加了 pod 并在情节提要中添加了视图,并分配了 Segmentio 类名并导入了 Segmentio。
这里如何在segmentio中添加文本和图像数组
我试过如下:
import UIKit
import Segmentio
class EventsDashboardViewController: UIViewController {
@IBOutlet weak var segmentioView: Segmentio!
//var swipeMenuArray: NSMutableArray = []
var content = [SegmentioItem]()
override func viewDidLoad() {
super.viewDidLoad()
segmentioView.setup(
content: [SegmentioItem],
style: SegmentioStyle,
options: SegmentioOptions?
)
let tornadoItem = SegmentioItem(
(title: "Alert",
image: UIImage(named: "img1")),
(title: "Message",
image: UIImage(named: "img2")),
(title: "Stared",
image: UIImage(named: "img3"))
)
content.append(tornadoItem)
}
}
错误:
一行中的连续声明必须用';'分隔
调用中缺少参数标签“title:image:selectedImage:”
一行中的连续声明必须用';'分隔