消息"容器文字中的预期表达式"继续出现在变量行中。代码如下:
import ResearchKit
public var ConsentDocument: ORKConsentDocument {
let consentDocument = ORKConsentDocument()
consentDocument.title = "Example Consent"
let _: [ORKConsentSectionType] = [
var consentSection: [ORKConsentSection] = consentSectionTypes.map { contentSectionType in
let consentSection = ORKConsentSection(type: contentSectionType)
consentSection.summary = "x."
consentSection.content = "y."
return consentSection
}
很抱歉这个混乱。