-
Notifications
You must be signed in to change notification settings - Fork 302
Open
Description
Hi guys,
First off, thanks for putting this really amazing looking library out there
Could someone please provide a solution as to how to implement this beautiful library in Swift
I can load the OverlayView but I can't figure out how to connect the progress
I am using Alamofire
In my post request
var progressFloat: Float = 0.0
...
upload.uploadProgress(closure: { //Get Progress
progress in
print(progress.fractionCompleted)
// cast value as float
progressFloat = Float(progress.fractionCompleted)
// the initial overlay view gets loaded
MRProgressOverlayView.showOverlayAdded(to: self.view, title: "Uploading", mode: MRProgressOverlayViewMode.determinateCircular, animated: true)
// this is where I am stuck
// setProgress is a child, but throws error:
// 'use of instance member 'setProgress' on type MRProgressOverlayView'; did you mean to use a value of type MRProgressOverlayView
MRProgressOverlayView.setProgress(progressFloat, true)
// MRProgressView.setProgress doesn't work either
I am also getting the error
/Pods/MRProgress/src/Components/MRProgressOverlayView.m:815
2017-01-23 16:23:32.207 MyProject[5844:139083] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Mode must support setProgress:animated:, but doesnot!'
if progress.fractionCompleted == 1 {
print("Completed")
// this is also throwing an error
MRProgressOverlayView.dismiss(self)
}
})
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels