2012-03-13 60 views

回答

0
NSDictionary *attributesDictionary = [NSDictionary dictionaryWithObjectsAndKeys: 
              [UIColor colorWithRed:220.0/255.0 green:104.0/255.0 blue:1.0/255.0 alpha:1.0], UITextAttributeTextColor, 
              [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0],      UITextAttributeTextShadowColor, 
              [NSValue valueWithUIOffset:UIOffsetMake(0, 1)],        UITextAttributeTextShadowOffset, 
              [UIFont systemFontOfSize:14],             UITextAttributeFont, 
              nil]; 
[[UISegmentedControl appearance] setTitleTextAttributes:attributesDictionary forState:UIControlStateSelected]; 

文檔:

UIAppearance Protocol Reference

setTitleTextAttributes:forState:

+0

我剛纔讀它在doc ANW謝謝了很多 – 2012-03-13 13:10:20

相關問題