[英]How to make a border around a letter in UI Button/Text Label?
我已經嘗試了40分鍾,但仍然無法在出現的文字周圍加上邊框,它只是一種純色,藍色,我需要在文字周圍加上黑色邊框。
[bigButtonHere setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
[bigButtonHere.titleLabel setShadowOffset:CGSizeMake(1, 2)];
我怎樣才能做到這一點?
附加:我需要在按鈕上的文本上輸入文本,因此如果文本為黃色,則字母周圍必須有黑色輪廓。
只要
bigButtonHere.titleLabel.shadowOffset=CGSizeMake(1, 2);
bigButtonHere.titleLabel.shadowColor=[UIColor redColor];
經過測試!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.