iOS add / remove shadow from a view

后端 未结 6 2187
遇见更好的自我
遇见更好的自我 2021-02-12 22:14

I do not understand how to remove a shadow that was added to a view. I add to my view in initWithFrame a shadow in this way:

self.layer.borderWidth          


        
6条回答
  •  感情败类
    2021-02-12 23:17

    the "layer" that you are trying to make hidden is the layer of the object that you are having a shadow to it's not a visible aspect.. only the objects with in the layer... it's rather confusing to conceptualize anyways, the only way to remove the shadow is to undo what you originally did, which was suggested above, there is no defined property that you can just toggle a bool and make the shadow go away

提交回复
热议问题