RSDTaskInfoStepViewController
open class RSDTaskInfoStepViewController : RSDStepViewController, UITextViewDelegate
RSDTaskInfoStepViewController
is designed to be used to display a RSDTaskInfoStep
either to give the user feedback
when a task or survey is being fetched or else to provide a consistent UI for the introduction of all tasks.
This view controller includes a default nib implementation that is included in this framework. It includes various UI elements that can indicate to the user how much time is remaining in a longer-running step. For example, this could be used during a walk step to indicate to the user how long they have been walking as well as how much longer they have to walk before the step is complete.
Seealso
RSDTaskViewController.vendDefaultViewController(for:)
-
A header for the view controller.
Declaration
Swift
@IBOutlet public var headerView: UIView?
-
The title label is used to display the title for the task.
Declaration
Swift
@IBOutlet public var titleLabel: UILabel?
-
The subtitle label is used to display the subtitle for the task.
Declaration
Swift
@IBOutlet public var subtitleLabel: UILabel?
-
The icon image view is used to display an icon for the task.
Declaration
Swift
@IBOutlet public var iconImageView: UIImageView?
-
The text view is used to display the detail text for the task. This implementation uses a
UITextView
to allow scrolling of the text included in this view.Declaration
Swift
@IBOutlet public var textView: UITextView?
-
The
RSDTaskInfoStep
object with the information to display about this task. This can be displayed while the task is loading.Declaration
Swift
public var taskInfoStep: RSDTaskInfoStep! { get }
-
Override
viewDidLoad()
to set up the default font, color, and position of the UI elements.Declaration
Swift
override open func viewDidLoad()
-
Override
viewWillAppear()
to set the text and images before displaying the view controller.Declaration
Swift
open override func viewWillAppear(_ animated: Bool)
-
Override the skip forward action to cancel the task
Declaration
Swift
open override func skipForward()
-
Override
viewDidLayoutSubviews()
to update the footer shadow that is used to indicate that there is additional information below the fold.Declaration
Swift
open override func viewDidLayoutSubviews()
-
Base class implementation will call
updateShadows()
.Declaration
Swift
open func scrollViewDidScroll(_ scrollView: UIScrollView)
-
Base class implementation will call
updateShadows()
if not decelerating.Declaration
Swift
open func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool)
-
Base class implementation will call
updateShadows()
.Declaration
Swift
open func scrollViewDidEndDecelerating(_ scrollView: UIScrollView)
-
Update the footer shadow that is used to indicate that there is additional information below the fold.
Declaration
Swift
open func updateShadows()
-
The default nib name to use when instantiating the view controller using
init(step:)
.Declaration
Swift
open class var nibName: String { get }
-
The default bundle to use when instantiating the view controller using
init(step:)
.Declaration
Swift
open class var bundle: Bundle { get }
-
Initialize the class using the given nib and bundle.
Note
If this initializer is used with anil
nib, then it must assign the expected outlets.Declaration
Parameters
nibNameOrNil
The name of the nib or
nil
.nibBundleOrNil
The name of the bundle or
nil
. -
Required initializer. This is the initializer used by a
UIStoryboard
.Declaration
Swift
public required init?(coder aDecoder: NSCoder)
Parameters
aDecoder
The decoder used to initialize this view controller.