AddPhotoVC
final class AddPhotoVC : UIViewController
extension AddPhotoVC: LocationSearchDelegate
extension AddPhotoVC: UITextViewDelegate
extension AddPhotoVC: KeyboardListener
extension AddPhotoVC: UIImagePickerControllerDelegate
extension AddPhotoVC: UINavigationControllerDelegate
extension AddPhotoVC: Exposing
extension AddPhotoVC: InterfaceBuildable
extension AddPhotoVC: Injectable
Handles creation and uploading of new photos to MTP
-
Stop editing on touch
Declaration
Swift
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?)
Parameters
touches
User touches
event
Touch event
-
Handle a location selection
Declaration
Swift
func locationSearch(controller: RealmSearchViewController, didSelect item: Object)
Parameters
controller
source of selection
item
Country or Location selected
-
Respond to edit beginning
Declaration
Swift
func textViewDidBeginEditing(_ textView: UITextView)
Parameters
textView
Active edit target
-
Detect return key to end editing
Declaration
Swift
func textView(_ textView: UITextView, shouldChangeTextIn _: NSRange, replacementText text: String) -> Bool
Parameters
textView
Active edit target
_
Replacement range
text
Replacement text
Return Value
Change permission
-
Respond to text changes
Declaration
Swift
func textViewDidChange(_ textView: UITextView)
Parameters
textView
Active edit target
-
Respond to edit ending
Declaration
Swift
func textViewDidEndEditing(_ textView: UITextView)
Parameters
textView
Active edit target
-
Scroll view for keyboard avoidance
Declaration
Swift
var keyboardScrollee: UIScrollView? { get }
-
Receive system provided image
Declaration
Swift
func imagePickerController( _ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any] )
Parameters
picker
The system photo picker
info
Picking results
-
Handle image picking cancel
- picker: The system photo picker
Declaration
Swift
func imagePickerControllerDidCancel(_ picker: UIImagePickerController)
-
Expose controls to UI tests
Declaration
Swift
func expose()
-
Injection enforcement for viewDidLoad
Declaration
Swift
func requireOutlets()
-
Injected dependencies
Declaration
Swift
typealias Model = (photo: Photo?, mappable: Mappable?, delegate: AddPhotoDelegate)
-
Handle dependency injection
Declaration
Swift
func inject(model: Model)
Parameters
model
Dependencies
-
Enforce dependency injection
Declaration
Swift
func requireInjection()