Eureka 不支持 Swift 5 |斯威夫特/Xcode
我必须从用户那里收集三个不同部分的数据。我决定使用第三方 Pod,而不是自己构建所有表单并花费很长时间。我发现Eureka被大量使用。由于某种原因,无论我遵循什么教程,它都不适合我。
这是我的 Podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
target 'Pics2Report' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Pics2Report
pod 'IQKeyboardManagerSwift'
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Storage'
target 'Pics2ReportTests' do
inherit! :search_paths
# Pods for testing
end
target 'Pics2ReportUITests' do
# Pods for testing
end
pod 'SCLAlertView'
pod 'HGPlaceholders'
pod 'FloatingPanel'
pod 'BEMCheckBox'
pod 'Eureka'
end
它表示我已成功安装 pod。在我的项目中,我尝试运行此代码:
import Foundation
import Eureka
import UIKit
class FileDetailsViewController: FormViewController {
override func viewDidLoad() {
super.viewDidLoad()
form +++ Section("About You")
<<< TextRow() { row in
row.title = "Name"
row.placeholder = "Your Name"
}
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
//Lock screen into portrait mode
AppUtility.lockOrientation(.portrait)
self.hideKeyboardWhenTappedAround()
}
}
但出现以下错误:
Missing arguments for parameters 'options', 'isOpened' in call
对于这行代码:
form +++ Section("About You")
以及此错误:
Binary operator '<<<' cannot be applied to operands of type 'Section' and 'TextRow'
对于这行代码:
<<< TextRow() { row in
我在这里做错了什么?尤里卡已经过时了吗?就像它没有识别出它是正确的尤里卡格式一样。是否有更好的表单生成器允许我使用带有文本字段和内部日期选择器的可扩展/可折叠部分?
I've got to gather three different sections of data from users. Instead of building all the forms myself and it taking forever, I decided to use a third party pod. I found that Eureka is largely used. For some reason, it WILL NOT work for me, no matter what tutorial I follow.
Here is my Podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
target 'Pics2Report' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Pics2Report
pod 'IQKeyboardManagerSwift'
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Storage'
target 'Pics2ReportTests' do
inherit! :search_paths
# Pods for testing
end
target 'Pics2ReportUITests' do
# Pods for testing
end
pod 'SCLAlertView'
pod 'HGPlaceholders'
pod 'FloatingPanel'
pod 'BEMCheckBox'
pod 'Eureka'
end
It says I installed the pod successfully. Inside my project, I try to run this code:
import Foundation
import Eureka
import UIKit
class FileDetailsViewController: FormViewController {
override func viewDidLoad() {
super.viewDidLoad()
form +++ Section("About You")
<<< TextRow() { row in
row.title = "Name"
row.placeholder = "Your Name"
}
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
//Lock screen into portrait mode
AppUtility.lockOrientation(.portrait)
self.hideKeyboardWhenTappedAround()
}
}
but I'm getting the following error:
Missing arguments for parameters 'options', 'isOpened' in call
for this line of code:
form +++ Section("About You")
and this error:
Binary operator '<<<' cannot be applied to operands of type 'Section' and 'TextRow'
for this line of code:
<<< TextRow() { row in
What am I doing wrong here?? Is Eureka outdated? It's like it's not recognizing that it's proper Eureka formatting. Is there a better form builder that will allow me to use expandable/collapsable sections with textfields and a date picker inside?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Eureka Swift 5 修复:在部分之前添加 Eureka.
Eureka Swift 5 fix: Add Eureka. before Section