Skip to content

Instantly share code, notes, and snippets.

@pay-napster-x
Last active April 23, 2020 04:27
Show Gist options
  • Save pay-napster-x/7123ee45156fb8a53775f17ac1bda31f to your computer and use it in GitHub Desktop.
Save pay-napster-x/7123ee45156fb8a53775f17ac1bda31f to your computer and use it in GitHub Desktop.
@IBAction private func uploadAction() {
dismissKeyboard()
guard !((titleTextField.text?.isEmpty) ?? true) else {
Toast(text: "제목을 입력해주세요 :)").show()
return
}
showPencilUsingAllowPopup(action: { [weak self] in
if Reachability.checkWiFi() {
//1.
self?.appendUploadingView()
//2.
self?.viewModel.uploadAttachment(title: self?.titleTextField.text ?? "")
} else {
self?.internetCheckWarnning()
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment