Inverse UIlabel text color when its frame intersects an UIView

前端 未结 4 1454
盖世英雄少女心
盖世英雄少女心 2020-12-29 11:43

Hi Im trying to change the text color of a UILabel in the case when the labels rect intersects an UIView, i was thinking maybe there is a property or something i can use. L

4条回答
  •  失恋的感觉
    2020-12-29 12:09

    Take a look at this tutorial for creating alpha masks with text. Using this technique you can implement a standard progress bar that moves across both the foreground and the background view to achieve the effect you want.

提交回复
热议问题