Outline UILabel text in UILabel Subclass

后端 未结 6 1935
你的背包
你的背包 2020-12-31 09:52

I\'m trying hard to find a way to simply add an outline/stroke/contour to my UILabel text. Talking about a stroke around the letters of the text not around the background of

6条回答
  •  情深已故
    2020-12-31 10:36

    Your code works for me if I set the type of the attributes dictionary, like this:

    let strokeTextAttributes: [String: Any] = [
      // etc...
    ]
    

    Maybe that's all your missing?

提交回复
热议问题