diff --git a/Glideshow/GlideCell.swift b/Glideshow/GlideCell.swift index 6349015..493a105 100644 --- a/Glideshow/GlideCell.swift +++ b/Glideshow/GlideCell.swift @@ -155,14 +155,14 @@ class GlideCell: UICollectionViewCell { /// glide factor for the description lable. Default: 3 public var descriptionGlideFactor : CGFloat = 3 { didSet{ - slideDescription.glideFactor = titleGlideFactor + slideDescription.glideFactor = descriptionGlideFactor } } /// glide factor for the title lable. Default: 1 public var captionGlideFactor : CGFloat = 1 { didSet{ - slideCaption.glideFactor = titleGlideFactor + slideCaption.glideFactor = captionGlideFactor } } diff --git a/GlideshowTests/GlideshowTests.swift b/GlideshowTests/GlideshowTests.swift index 36107ef..0b05f73 100644 --- a/GlideshowTests/GlideshowTests.swift +++ b/GlideshowTests/GlideshowTests.swift @@ -111,4 +111,22 @@ class GlideshowTests: XCTestCase { XCTAssertEqual(glideshow.pageIndicator!.numberOfPages, 2) } + + func test_setDescriptionGlideFactor() throws { + let descriptionGlideFactor: CGFloat = 2.0 + glideshow.descriptionGlideFactor = descriptionGlideFactor + XCTAssertEqual(glideshow.descriptionGlideFactor, descriptionGlideFactor) + } + + func test_setTitleGlideFactor() throws { + let titleGlideFactor: CGFloat = 1.0 + glideshow.titleGlideFactor = titleGlideFactor + XCTAssertEqual(glideshow.titleGlideFactor, titleGlideFactor) + } + + func test_setCaptionGlideFactor() throws { + let captionGlideFactor: CGFloat = 3.0 + glideshow.captionGlideFactor = captionGlideFactor + XCTAssertEqual(glideshow.captionGlideFactor, captionGlideFactor) + } }