2
A
回答
1
在GSBorderLabel看看。
這很好,因爲它增加了外邊框而不是內部邊框的字符,它很容易定製它。
例如:
GSBorderLabel *myLabel = [[GSBorderLabel alloc] initWithFrame:CGRectMake(0, 50, 300, 100)];
myLabel.textColor = [UIColor yellowColor];
myLabel.textAlignment = NSTextAlignmentCenter;
myLabel.borderColor = [UIColor grayColor];
myLabel.borderWidth = 20;
myLabel.text = @"Review";
myLabel.font = [UIFont fontWithName:@"Party LET" size:60.0];
0
如果你的目標是iOS 6或更高版本,那麼就沒有太多的理由。您可以簡單地使用NSAttributedString將筆觸添加到現有字體。請注意,這不會將筆畫添加到字體中,只是將其呈現在屏幕上。
NSDictionary *attributes = @{NSStrokeColorAttributeName: [UIColor grayColor], NSStrokeWidthAttributeName : @3};
NSString *inputText = @"Some text";
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:inputText attributes:attributes];
[self.someLabel setAttributedText:attributedString];
0
你可以試試這個:
#import <QuartzCore/QuartzCore.h>
....
titleLabel.layer.shadowColor = [[UIColor grayColor] CGColor];
titleLabel.layer.shadowRadius = 3;
titleLabel.layer.shadowOpacity = 1;
titleLabel.layer.shadowOffset = CGSizeMake(0, 0);
相關問題
- 1. Clojure的協議會影響?
- 2. ObjectiveC中的MulticastDelegate
- 3. Klout中的影響者和影響力
- 4. 陰影效果的影響
- 5. 的iOS:HMGLTransition影響
- 6. 影響MySQL的
- 7. HTML5的影響,
- 8. TYPE_INT_ARGB_PRE的影響
- 9. 影響
- 10. 影響
- 11. 影響
- 12. 影響
- 13. 影響
- 14. 影響
- 15. 影響
- 16. 影響
- 17. 影響
- 18. 影響
- 19. 影響
- 20. 影響
- 21. 影響
- 22. 影響
- 23. 影響影響所有在css按鈕
- 24. AUTOTRACE TRACEONLY的影響
- 25. System.setSecurityManager的影響(null)
- 26. 影響Internet Explorer的
- 27. iPhone OpenAL的影響
- 28. 影響的ListView頭
- 29. 性能的影響
- 30. 對Jquery的影響