FUITimelineMarkerCell
open class FUITimelineMarkerCell : NibDesignableFUIBaseTableViewCell, FUIStyleSheetAttributesApplying
FUITimelineMarkerCell
is a UITableViewCell
subclass, designed to present a business object related to an event, in a Timeline view.
FUITimelineMarkerCell
is a non-selectable withselectionStyle
set to.none
that is intended for timelines with start, inactive, early end, and end status that display timeline information.- It uses a vertical line and a node image as a separator. Left to the vertical line is the timeline event section that contains
eventLabel
andeventImageView
; right to the vertical line istitleLabel
. - The vertical line contains
leadingTimeline
on the top,nodeImageView
in the middle, and atrailingTimeline
at the bottom.
## Usage
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "FUITimelineMarkerCell", for: indexPath) as! FUITimelineMarkerCell
cell.titleText = "Project Start"
cell.nodeType = .start
cell.eventText = "12/6/15"
cell.showLeadingTimeline = false
return cell
}
## Notes
### SingleLine
Separator Between Timeline Items in the Table
The default table view separatorStyle
is .singleLine
. Because of this default setting, there can be a 1.0 px divider line or a separator in-between each item on the timeline in the table. This is not an issue in timeline. To get rid of the separator, set separatorStyle
to none
in the TabelViewController
class
override func viewDidLoad() {
super.viewDidLoad()
// ...
self.tableView.separatorStyle = .none
// ...
}
## Theming Supported style classes
fdlFUITimelineMarkerCell
fdlFUITimelineMarkerCell_titleLabel
fdlFUITimelineMarkerCell_eventLabel
fdlFUITimelineMarkerCell_eventImageView
fdlFUITimelineMarkerCell_nodeImageView
fdlFUITimelineMarkerCell_cardBackground
fdlFUITimelineMarkerCell_timelineBackground
-
The version to be displayed. The default is
.v2
Declaration
Swift
public var version: FUITimeline.Version { get set }
-
Reuse identifier @return String a reuse identifier that describes FUITimelineMarkerCell
Declaration
Swift
open class var reuseIdentifier: String { get }
-
A timestamp label in the cell’s left column.
Important
Use the@IBInspectable
eventText
property to set the label’s text value
Declaration
Swift
@IBOutlet public private(set) var timestampLabel: FUILabel! { get }
-
A secondary timestamp label in the cell’s left column.
Declaration
Swift
@IBOutlet public private(set) var secondaryTimestampLabel: FUILabel! { get }
-
A timestamp image view in the cell’s left column.
Important
Use the@IBInspectable
secondaryTimestampImage
property to set the image view’s image value
Declaration
Swift
@IBOutlet public private(set) var secondaryTimestampImageView: FUIImageView! { get }
-
A node image view, centered on the cell’s vertical timeline line.
Remark
UsenodeType
property to set appropriate node.Declaration
Swift
@IBOutlet public private(set) var nodeImageView: FUIImageView! { get }
-
The color of the node.
Declaration
Swift
public var nodeColor: UIColor? { get set }
-
The type of sdk default node icon the timeline cell will use. Default value is
.open
.Declaration
Swift
public var nodeType: NodeType { get set }
-
A Boolean value indicates whether the timestamp of the timeline cell is in the past. The default value is
false
.Declaration
Swift
public var isPast: Bool { get set }
-
A Boolean value indicates whether the timestamp of the timeline cell is in the present. The default value is
false
.Declaration
Swift
public var isPresent: Bool { get set }
-
A separator line in the cell’s top. The default is
separatorLineView.isHidden = true
. UseseparatorLineView.isHidden = false
to show separator line.Declaration
Swift
public lazy var separatorLineView: UIView { get set }
-
The background view of this
FUITimelineMarkerCell
.Declaration
Swift
public private(set) var cardBackground: UIView { get }
-
The background view of of the area on the left of timeline.
Declaration
Swift
@IBOutlet public private(set) weak var timelineBackground: UIView! { get }
-
Property defining the titleLabel text. An empty value hides titleLabel.
Declaration
Swift
@IBInspectable public var titleText: String? { get set }
-
Property defining the timestamp text. An empty value hides the timestamp label.
Declaration
Swift
@IBInspectable public var timestampText: String? { get set }
-
Property defining the secondary timestamp text. An empty value hides the secondary timestamp label.
Declaration
Swift
@IBInspectable public var secondaryTimestampText: String? { get set }
-
Property defining the secondaryTimestampImageView’s image. An empty value hides the secondaryTimestampImageView.
Declaration
Swift
@IBInspectable public var secondaryTimestampImage: UIImage? { get set }
-
The image used as node icon.
If the value of this property is not nil, the timeline cell uses the given image as the node icon. It ignores the value of the
nodeType
property.nodeColor
andnodeColorDisabled
properties will also be ignored so developer is responsible for providing a image with desired color.Declaration
Swift
@IBInspectable public var nodeImage: UIImage? { get set }
-
Property defining the timeline width, which is the width of the whole timestamp view left to the veritical line in the cell. The default width is
70.0
pxDeclaration
Swift
@IBInspectable public var timelineWidth: CGFloat { get set }
-
Property defining the flag to show or not to show timeline’s leading vertical line. Default is true.
Declaration
Swift
@IBInspectable public var showLeadingTimeline: Bool { get set }
-
Property defining the flag to show or not to show timeline’s trailing vertical line. Default is true.
Declaration
Swift
@IBInspectable public var showTrailingTimeline: Bool { get set }
-
Node type for
See moreFUITimelineMarkerCell
.Declaration
Swift
public enum NodeType : Int