Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overridable Timer Type #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Demo/Demo/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -583,20 +583,20 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="e3t-lO-LwR">
<rect key="frame" x="20" y="448.00000953674316" width="374" height="43.666667938232422"/>
<rect key="frame" x="20" y="448.00000953674316" width="374" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="e3t-lO-LwR" id="Ljd-zn-wdH">
<rect key="frame" x="0.0" y="0.0" width="374" height="43.666667938232422"/>
<rect key="frame" x="0.0" y="0.0" width="374" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Background Color" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Op-pm-K77">
<rect key="frame" x="25" y="11.666666666666666" width="137" height="20.333333333333336"/>
<rect key="frame" x="25" y="11.999999999999998" width="137" height="20.333333333333329"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="TPa-cd-hV9">
<rect key="frame" x="300" y="6.3333333333333321" width="51" height="30.999999999999996"/>
<rect key="frame" x="300" y="6.6666666666666679" width="51" height="31.000000000000004"/>
<connections>
<action selector="backgroundColorToggled:" destination="yZL-Zz-aEt" eventType="valueChanged" id="fz9-oQ-vsN"/>
</connections>
Expand All @@ -611,13 +611,13 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="Le2-0X-9GZ">
<rect key="frame" x="20" y="491.66667747497559" width="374" height="43.666667938232422"/>
<rect key="frame" x="20" y="492.00000953674316" width="374" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Le2-0X-9GZ" id="GoU-jB-eIa">
<rect key="frame" x="0.0" y="0.0" width="374" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ECp-dX-4cT">
<button opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ECp-dX-4cT">
<rect key="frame" x="131" y="7" width="112" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="uhL-b2-bHv"/>
Expand Down
6 changes: 3 additions & 3 deletions Source/APNGKit/APNGImageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ open class APNGImageView: PlatformView {

public typealias PlayedLoopCount = Int
public typealias FrameIndex = Int

/// Whether the animation should be played automatically when a valid `APNGImage` is set to the `image` property
/// of `self`. Default is `true`.
open var autoStartAnimationWhenSetImage = true
Expand Down Expand Up @@ -64,9 +64,9 @@ open class APNGImageView: PlatformView {
/// `DisplayTimer` is used. On platforms that `CADisplayLink` is not available, a normal `Foundation.Timer` based
/// one is used.
#if canImport(UIKit)
public var DrivingTimerType: DrivingTimer.Type { NormalTimer.self }
open var DrivingTimerType: DrivingTimer.Type { NormalTimer.self }
#else
public var DrivingTimerType: DrivingTimer.Type { NormalTimer.self }
open var DrivingTimerType: DrivingTimer.Type { NormalTimer.self }
#endif

// When the current frame was started to be displayed on the screen. It is the base time to calculate the current
Expand Down