- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
在编译我的项目时,我不断收到此错误,有时我的项目运行顺利,但有时 xcode 会显示此错误。我还添加了 AddMembersViewController.swift,我认为这是导致问题的原因
MergeSwiftModule normal x86_64 /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/Rendezvous.swiftmodule
cd /Users/prakhar/Desktop/iOS/Rendezvous
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-module /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/MoreViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/HomePageViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/RegisterViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/LocationSelectorViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/AddMembersViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/SetupViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/ViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/AppDelegate~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/UpdateViewController~partial.swiftmodule -parse-as-library -target x86_64-apple-ios10.1 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk -I /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Products/Debug-iphonesimulator -F /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Products/Debug-iphonesimulator -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/FirebaseAnalytics/Frameworks/frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/FirebaseAuth/Frameworks/frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/FirebaseCore/Frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/FirebaseDatabase/Frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/FirebaseInstanceID/Frameworks/frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/GoogleInterchangeUtilities/Frameworks/frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/GoogleMaps/Base/Frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/GoogleMaps/Maps/Frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/GooglePlaces/Frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/GoogleSymbolUtilities/Frameworks/frameworks -enable-testing -g -import-objc-header /Users/prakhar/Desktop/iOS/Rendezvous/Rendezvous/Rendezvous-Bridging-Header.h -module-cache-path /Users/prakhar/Library/Developer/Xcode/DerivedData/ModuleCache -D DEBUG -serialize-debugging-options -Xcc -I/Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Rendezvous-generated-files.hmap -Xcc -I/Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Rendezvous-own-target-headers.hmap -Xcc -I/Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Rendezvous-all-target-headers.hmap -Xcc -iquote -Xcc /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Rendezvous-project-headers.hmap -Xcc -I/Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Firebase/Core/Sources -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/Firebase -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/FirebaseAnalytics -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/FirebaseAuth -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/FirebaseCore -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/FirebaseDatabase -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/FirebaseInstanceID -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/GTMSessionFetcher -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/GoogleInterchangeUtilities -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/GoogleMaps -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/GooglePlaces -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/GoogleSymbolUtilities -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/GoogleToolboxForMac -Xcc -I/Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/DerivedSources/x86_64 -Xcc -I/Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -working-directory/Users/prakhar/Desktop/iOS/Rendezvous -emit-module-doc-path /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/Rendezvous.swiftdoc -module-name Rendezvous -emit-objc-header-path /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/Rendezvous-Swift.h -o /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/Rendezvous.swiftmodule
0 swift 0x000000010fd283ad PrintStackTraceSignalHandler(void*) + 45
1 swift 0x000000010fd27b56 SignalHandler(int) + 790
2 libsystem_platform.dylib 0x00007fffd1db0bba _sigtramp + 26
3 libsystem_platform.dylib 0x00007fff52f3aba8 _sigtramp + 2165874696
4 swift 0x000000010d334996 swift::ModuleFile::getType(llvm::PointerEmbeddedInt<unsigned int, 31>) + 806
5 swift 0x000000010d32d178 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 18664
6 swift 0x000000010d338b2c swift::ModuleFile::maybeReadPattern() + 332
7 swift 0x000000010d32bd82 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 13554
8 swift 0x000000010d33d4a7 swift::ModuleFile::loadAllMembers(swift::Decl*, unsigned long long) + 647
9 swift 0x000000010d6d006a (anonymous namespace)::Traversal::visitNominalTypeDecl(swift::NominalTypeDecl*) + 314
10 swift 0x000000010d6ce01b (anonymous namespace)::Traversal::doIt(swift::Decl*) + 219
11 swift 0x000000010d085c2f swift::SILPassManager::SILPassManager(swift::SILModule*, llvm::StringRef) + 1423
12 swift 0x000000010d08acef swift::runSILDiagnosticPasses(swift::SILModule&) + 159
13 swift 0x000000010cd34f7e performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) + 19758
14 swift 0x000000010cd2e2b3 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 17859
15 swift 0x000000010ccea5cf main + 8239
16 libdyld.dylib 0x00007fffd1ba3255 start + 1
Stack dump:
0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-module /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/MoreViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/HomePageViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/RegisterViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/LocationSelectorViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/AddMembersViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/SetupViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/ViewController~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/AppDelegate~partial.swiftmodule /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/UpdateViewController~partial.swiftmodule -parse-as-library -target x86_64-apple-ios10.1 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk -I /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Products/Debug-iphonesimulator -F /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Products/Debug-iphonesimulator -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/FirebaseAnalytics/Frameworks/frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/FirebaseAuth/Frameworks/frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/FirebaseCore/Frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/FirebaseDatabase/Frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/FirebaseInstanceID/Frameworks/frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/GoogleInterchangeUtilities/Frameworks/frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/GoogleMaps/Base/Frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/GoogleMaps/Maps/Frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/GooglePlaces/Frameworks -F /Users/prakhar/Desktop/iOS/Rendezvous/Pods/GoogleSymbolUtilities/Frameworks/frameworks -enable-testing -g -import-objc-header /Users/prakhar/Desktop/iOS/Rendezvous/Rendezvous/Rendezvous-Bridging-Header.h -module-cache-path /Users/prakhar/Library/Developer/Xcode/DerivedData/ModuleCache -D DEBUG -serialize-debugging-options -Xcc -I/Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Rendezvous-generated-files.hmap -Xcc -I/Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Rendezvous-own-target-headers.hmap -Xcc -I/Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Rendezvous-all-target-headers.hmap -Xcc -iquote -Xcc /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Rendezvous-project-headers.hmap -Xcc -I/Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Firebase/Core/Sources -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/Firebase -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/FirebaseAnalytics -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/FirebaseAuth -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/FirebaseCore -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/FirebaseDatabase -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/FirebaseInstanceID -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/GTMSessionFetcher -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/GoogleInterchangeUtilities -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/GoogleMaps -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/GooglePlaces -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/GoogleSymbolUtilities -Xcc -I/Users/prakhar/Desktop/iOS/Rendezvous/Pods/Headers/Public/GoogleToolboxForMac -Xcc -I/Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/DerivedSources/x86_64 -Xcc -I/Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -working-directory/Users/prakhar/Desktop/iOS/Rendezvous -emit-module-doc-path /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/Rendezvous.swiftdoc -module-name Rendezvous -emit-objc-header-path /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/Rendezvous-Swift.h -o /Users/prakhar/Library/Developer/Xcode/DerivedData/Rendezvous-ardcsmuqhgsylxapkcrnrtdcwvnu/Build/Intermediates/Rendezvous.build/Debug-iphonesimulator/Rendezvous.build/Objects-normal/x86_64/Rendezvous.swiftmodule
1. While loading members for 'AddMembersViewController' at <invalid loc>
2. While deserializing decl #143 (PATTERN_BINDING_DECL)
3. While deserializing decl #13 (VAR_DECL)
添加成员 View Controller
@IBOutlet weak var eventName: UITextField!
@IBOutlet weak var memberName: UITextField!
@IBOutlet weak var addButton: UIButton!
@IBOutlet weak var finishButton: UIButton!
@IBOutlet weak var createButton: UIButton!
@IBOutlet weak var timeAndDate: UIDatePicker!
@IBOutlet weak var errorLabel: UILabel!
@IBOutlet weak var tableView: UITableView!
var rCoordinate:CLLocationCoordinate2D!
var members:[String]=[]
var ref = FIRDatabase.database().reference(withPath: "event-data")
var refUser = FIRDatabase.database().reference(withPath: "user-data")
var event:String = ""
override func viewDidLoad() {
super.viewDidLoad()
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "members")
memberName.isEnabled=false
addButton.isHidden=true
finishButton.isHidden=true
let user = FIRAuth.auth()?.currentUser
members.append((user?.displayName!)!)
// Do any additional setup after loading the view.
}
@IBAction func cancel(_ sender: Any) {
let alert=UIAlertController.init(title: "confirmation", message: "Are you sure you want to cancel", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction.init(title: "Yes", style: UIAlertActionStyle.default, handler: {(action:UIAlertAction!) in
self.performSegue(withIdentifier: "home", sender: self)
}))
alert.addAction(UIAlertAction.init(title: "No", style: UIAlertActionStyle.cancel, handler: nil))
self.present(alert, animated: true, completion: nil)
}
@IBAction func create(_ sender: Any) {
eventName.isEnabled = false
timeAndDate.isEnabled = false
createButton.isHidden = true
addButton.isHidden = false
memberName.isEnabled = true
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
override func viewDidAppear(_ animated: Bool) {
errorLabel.text=""
}
@IBAction func add(_ sender: Any) {
errorLabel.text=""
let newUser:String = memberName.text!
for one in members{
if(one == newUser){
errorLabel.text="\(newUser) already added"
return
}
}
var flag=false
refUser.observeSingleEvent(of: .value, with: {(snapshot) in
let value=snapshot.value as! NSDictionary
for val in (value.allKeys){
//print(val)
if(newUser == val as? String){
flag=true
break
}
//print("inside \(flag)")
}
if(flag){
self.members.append(newUser)
self.tableView.reloadData()
self.memberName.text=""
self.finishButton.isHidden=false
}
else{
self.errorLabel.text="No such UserNAme found"
}
})
}
@IBAction func finish(_ sender: Any) {
let event=eventName.text!
if(members.count<2){
let alert=UIAlertController.init(title: "No members added", message: "Add atleast one more member", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction.init(title: "Ok", style: UIAlertActionStyle.cancel, handler: nil))
self.present(alert, animated: true, completion: nil)
}
let formatter=DateFormatter()
formatter.dateFormat = "MMMM dd ,YYYY"
let date = formatter.string(from: timeAndDate.date)
formatter.dateFormat = "hh:mm a"
let time = formatter.string(from: timeAndDate.date)
ref.child("\(event)/latitude").setValue(rCoordinate.latitude)
ref.child("\(event)/longitude").setValue(rCoordinate.longitude)
ref.child("\(event)/date").setValue(date)
ref.child("\(event)/time").setValue(time)
ref.child("\(event)/noOfMembers").setValue(members.count)
for i in 0..<members.count{
ref.child("\(event)/member\(i)").setValue(members[i])
refUser.child("\(members[i])/noOfEvents").observeSingleEvent(of: .value, with: {(snapshot) in
var no = snapshot.value as! Int
no += 1
self.refUser.child("\(self.members[i])/noOfEvents").setValue(no)
self.refUser.child("\(self.members[i])/event\(no)").setValue(event)
})
}
let alert=UIAlertController.init(title: "Done", message: "Event created..!", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction.init(title: "Ok", style: UIAlertActionStyle.default, handler: {(action:UIAlertAction) in
self.performSegue(withIdentifier: "home", sender: self)
}))
self.present(alert, animated: true, completion: nil)
}
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return members.count
}
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{
let cell=tableView.dequeueReusableCell(withIdentifier: "members", for: indexPath)
cell.textLabel?.text=members[indexPath.row]
cell.selectionStyle = .none
return cell
}
func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
//let user = FIRAuth.auth()?.currentUser?.displayName
if(editingStyle == UITableViewCellEditingStyle.delete){
if(indexPath.row == 0){
let alert=UIAlertController.init(title: "Error !!", message: "You cannot remove yourself..!", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction.init(title: "Ok", style: UIAlertActionStyle.cancel, handler: nil))
self.present(alert, animated: true, completion: nil)
}
else{
members.remove(at: indexPath.row)
if(members.count < 2){
finishButton.isHidden = true
}
tableView.reloadData()
}
}
}
public func numberOfSections(in tableView: UITableView) -> Int{
return 1
}
最佳答案
Command+Shift+K 清理你的项目,然后 File->Workspace settings->DerivedData 旁边的小箭头并删除文件夹。这有时可以解决问题。
另外,我注意到在 Xcode 8.3 beta 中这个问题不再存在。
关于ios - 命令因信号 : Segmentation fault:11 而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42062913/
我在使用以下代码时遇到问题: function http_file_exists($url){ $f=fopen($url,"r"); if($f){ fclose($f); retu
我已经通过 Git 部署到 Azure 几个月了,没有出现重大问题,但现在我似乎遇到了一个无法克服的错误。 我创建了一个新的 Azure 网站,为正在开发的项目创建单独的预览链接。我在新站点上设置了
我已经通过flutter创建了一个App并完成了它,我想在flutter文档中阅读时进行部署。 我收到此错误: FAILURE: Build failed with an exception. * W
我在Windows 10中使用一些简单的Powershell代码遇到了这个奇怪的问题,我认为这可能是我做错了,但我不是Powershell的天才。 我有这个: $ix = [System.Net.Dn
我正在尝试使用 RapidJSON 解析从服务器接收到的数据。以下是收到的确切字符串: [ { "Node": "9478149a08f9", "Address": "172.17
我尝试为 ios 编译 OpenCV。我总是收到这些错误。我用不同版本的opencv试了一下,结果都是一样的。 我运行这个:python 平台/ios/build_framework.py ios_o
我在一台机器上做基本的发布/订阅,我的客户端是 StackExchange-Redis 的 C# 客户端,我在同一台机器上运行基于 Windows 的 Redis 服务器(服务器版本 2.8.4) 当
我有这段代码,但无法执行,请帮我解决这个问题 连接 connect_error) { die ("connection failed: " . $terhubung->connect_erro
我在 tomcat 上运行并由 maven 编译的 Web 应用程序给出了以下警告和错误。我可以在本地存储库中看到所有 JAR,但有人可以帮忙吗。 WARNING: Failed to scan JA
我正在 Windows 8 上使用 Android Studio 开发一个 android 应用程序,我正在使用一些 native 代码。突然间我无法编译我的 C 文件。当我运行 ndk-build
下面的代码对类和结构的成员进行序列化和反序列化。序列化工作正常,但我在尝试使用 oarch >> BOOST_SERIALIZATION_NVP(outObj); 反序列化时遇到了以下错误; 代码中是
如果我运行此命令“rspec ./spec/requests/api/v1/password_reset_request_spec.rb”,此文件中的所有测试都会通过。 但是,当我运行“rspec”时
我在尝试执行测试以使用 Protractor 上传文件时出错,我的代码是这个 it('it should be possible to upload a file', function() {
System.loadLibrary("nativefaceswap"); 当我运行我的应用程序时,我在 Android Studio 中发现了此类错误。在logcat中显示: java.lang.U
我希望有人能帮助我!使用任何方法或命令行的任何 SSL/HTTPS 调用均无效。 我在 Windows 10 中使用 Ubuntu Server 18.04 作为子系统。我的问题是昨天才开始出现的,因
通过删除这两个值将日期字段从 null=True 和 Blank=True 更改为 required 时,使用 db.alter 命令时遇到问题。 当以下行被注释掉时,迁移运行不会出现问题。
我第一次使用 Heroku 尝试创建应用程序(使用 SendGrid 的 Inbound Parse Webhook"和 Twilio SMS 通过电子邮件发送和接收 SMS 消息)。通过 Virtu
我正在将我的 swift 项目更新到 Xcode 7 上的 Swift 2.0。xcode 在构建项目时报告了以下错误: 命令/Applications/Xcode.app/Contents/Deve
在我的代码中,SSL 库函数 SSL_library_init() 没有按预期返回 1。我如何才能看到它返回了什么错误? 我在 SSL_library_init() 之后调用了 SSL_load_er
我正在尝试运行在以下链接中找到的答案: Asynchronously Load the Contents of a Div 但是当我这样做时,我会遇到我不太理解的错误。 我的代码: $(documen
我是一名优秀的程序员,十分优秀!