SwifterSwift: shadowOffset for UILabel is conflict with UILabel's property.

[v] I’ve read, understood, and done my best to follow the Contributing guidelines before opening this issue.

What did you do?

Set shadowOffset, shadowColor, shadowRadius inspectable value on UILabel.

What did you expect to happen?

UILabel with proper shadow

What happened instead?

shadowOffset is not applied, because UILabel has shadowOffset property. So shadow is always above text, because layer.shadowOffset default value is (0, -3) (Also UILabel has shadowColor property.)

SwifterSwift Environment

  • SwifterSwift version: 4.6.0
  • Xcode version: 10
  • macOS version running Xcode: 10.14.2
  • Swift version: 4.2
  • Platform(s) running SwifterSwift: iOS

Demo Project

Please link to or upload a project we can download that reproduces the issue.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 23 (16 by maintainers)

Most upvoted comments

For the reference https://forums.swift.org/t/import-declarations/39562 I think the best option we have then is to rename our UIView extensions to something like viewShadowOffset it is going to be a breaking change but at least we avoid problems with name collision from other modules.

Ah sorry, we let the bot close this one… Thanks for reopening this @multinerd I think the simplest solution to this is to rename our UIView extension to something else, not really sure, but maybe viewShadowOffset? Because I honestly don’t know if it is possible to disambiguate that at the call