Juanpe / SkeletonView

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
MIT License
12.53k stars 1.1k forks source link

Lost UILabel constraint height after call `hideSkeleton` #405

Closed huangshan-ios closed 3 years ago

huangshan-ios commented 3 years ago

Description

Lost constraint height of UILabel after call container.hideSkeleton()

What type of issue is this? (place an x in one of the [ ])

Requirements (place an x in each of the [ ])


Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

SkeletonView Environment:

SkeletonView version: 1.16.0 Xcode version: 12.5 **Swift version: 5.0

Steps to reproduce:

Please replace this with the steps to reproduce the behavior.

  1. Set constraint height for label
  2. Call showAnimatedSkeleton in UILabel container view
  3. After delay call hideSkeleton in container view

Expected result:

Does not remove the current height constraint of UILabel.

Actual result:

The height constraint of UILabel is removed.

Attachments:

None

Juanpe commented 3 years ago

Hi @huangshan-ios, thanks for reporting this bug.

I've checked and you were right, there was a bug related to the constraints.

This issue has been solved, but it's not released yet, although you can check the solution by installing the pod (if you are using CocoaPods) indicating the specific branch:

pod 'SkeletonView', :git => 'https://github.com/Juanpe/SkeletonView.git', :branch => 'main'

Juanpe commented 3 years ago

The version that includes the fix has been released!