MemeChallengeViewController
open class MemeChallengeViewController: NibViewController,
ChallengeResponderDelegate,
UIGestureRecognizerDelegate,
UITextFieldDelegate,
UIPickerViewDelegate,
UIPickerViewDataSource
Undocumented
-
Textfied that is used for putting caption on a
separateFromImage
subtype.Declaration
Swift
@IBOutlet public weak var captionSeparateFromImageTextField: UITextField!
-
Textfield used for selecting
font size
of the caption.Declaration
Swift
@IBOutlet public weak var fontTextField: UITextField!
-
Button used for selecting
color
for the captionDeclaration
Swift
@IBOutlet public weak var colorPickerButton: UIButton!
-
View where captions and images are being add.
Declaration
Swift
@IBOutlet public weak var canvasView: UIView!
-
Image view for the meme to respond.
Declaration
Swift
@IBOutlet public weak var imageView: UIImageView!
-
Textfied that is used for putting caption on a
overImage
subtype.Declaration
Swift
@IBOutlet public weak var captionTextField: UITextField!
-
Button for adding the text on the
captionTextField
on thecanvasView
.Declaration
Swift
@IBOutlet public weak var addButton: UIButton!
-
Parent view for
overImage
subtype views.Declaration
Swift
@IBOutlet public weak var captionEditorView: UIView!
-
Challenge Responder object.
Declaration
Swift
open var responder: ChallengeResponder?
-
Picker view that is added on the
fontTextField
.Declaration
Swift
open lazy var fontPickerView: UIPickerView { get set }
-
Selected caption of the user.
Declaration
Swift
open var selectedCaption: UILabel?
-
Color use for the caption.
Declaration
Swift
open var captionColor: UIColor? { get }
-
Mininum caption font size.
Declaration
Swift
open var minCaptionFontSize: Int
-
Maximum caption font size.
Declaration
Swift
open var maxCaptionFontSize: Int
-
Array of font sizes ranging from
minCaptionFontSize
up tomaxCaptionFontSize
.Declaration
Swift
open var fontSizes: [Int]
-
Current font that is used by captions.
Declaration
Swift
open var captionFont: UIFont { get set }
-
Delegate for presenting a color picker and passing color object.
Declaration
Swift
open var memeColorPickerDelegate: MemeColorPickerDelegate?
-
Delegate for sharing the challenge along with the data to social media.
Declaration
Swift
open var shareToSocialMediaDelegate: ShareChallengeToSocialMediaDelegate?
-
Loading alert that is displayed when responding on a challenge.
Declaration
Swift
open var loadingAlert: AlertViewController
-
Undocumented
Declaration
Swift
override open func dismiss(animated flag: Bool, completion: (() -> Void)? = nil)
-
Undocumented
Declaration
Swift
override open func viewWillAppear(_ animated: Bool)
-
Undocumented
Declaration
Swift
public convenience init(challenge: Challenge)
-
Declaration
Swift
override open func setup()
-
This sets the
font, text color, and size
of the selected label.Declaration
Swift
open func updateSelectedCaption()
-
Update the views when a caption was tapped.
Declaration
Swift
open func selectCaption(label: UILabel)
-
Reset the view’s subviews to its original state.
Declaration
Swift
open func resetViews()
-
Generate a label inside the
canvasView
.Declaration
Swift
open func createCaptionInsideCanvas()
-
Updates the location of the panned caption.
Declaration
Swift
@objc open func didPanCaption(_ gestureRecognizer: UIPanGestureRecognizer)
-
Selects the tapped caption.
Declaration
Swift
@objc open func didTapCaption(_ gestureRecognizer: UITapGestureRecognizer)
-
Resets the view.
Declaration
Swift
@objc open func dismissKeyboard()
-
Undocumented
Declaration
Swift
open func onSuccess(with apiResponse: APIResponse<Challenge.ResponseInfo>)
-
Undocumented
Declaration
Swift
open func onFailure(with error: Error)
-
Undocumented
Declaration
Swift
open func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool
-
Undocumented
Declaration
Swift
open func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool
-
Undocumented
Declaration
Swift
open func textFieldShouldReturn(_ textField: UITextField) -> Bool
-
Undocumented
Declaration
Swift
public func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String?
-
Undocumented
Declaration
Swift
public func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int)
-
Undocumented
Declaration
Swift
public func numberOfComponents(in pickerView: UIPickerView) -> Int
-
Undocumented
Declaration
Swift
public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int