修改UITabBarItem下面字体的颜色,如图:
[[UITabBarItem
appearance] setTitleTextAttributes:[NSDictionary
dictionaryWithObjectsAndKeys:[UIColor
blackColor], UITextAttributeTextColor,
nil] forState:UIControlS...
分类:
其他好文 时间:
2015-01-08 15:24:54
阅读次数:
122
1.在storyBoard中,选中tabBarController,设置tabBar如图2. 直接代码设置tabBarController.tabBar.selectedImageTintColor = [UIColor orangeColor];修改tabBarItem的字体颜色:[tabBarI...
分类:
其他好文 时间:
2015-01-07 18:38:45
阅读次数:
146
- (NSDictionary *)getRGBDictionaryByColor:(UIColor *)originColor
{
CGFloat r=0,g=0,b=0,a=0;
if ([self
respondsToSelector:@selector(getRed:green:blue:alpha:)]) {
[originColor
getRed:&r...
分类:
移动开发 时间:
2015-01-06 12:04:52
阅读次数:
135
/**
* 获取UIColor对象的rgb值。
*
* @param originColor
*
* @return
*/
- (NSString *)getHexStringByColor:(UIColor *)originColor
{
NSDictionary *colorDic
= [self getRGBDictiona...
分类:
移动开发 时间:
2015-01-06 12:04:09
阅读次数:
181
/**
* 获取UIColor对象的HSB字符串值。
*
*/
- (NSString *)getHSBStringByColor:(UIColor *)originColor {
// Method provided by the Colours class extension
NSDictionary *hsbDict = [self
getHS...
分类:
移动开发 时间:
2015-01-06 12:04:08
阅读次数:
145
/**
* 获取UIColor对象的CMYK值。
*
* @return
*/
- (NSDictionary *)getCMYKValueByColor:(UIColor *)originColor
{
// Convert RGB to CMY
NSDictionary *rgb = [self
getRGBDictionaryByC...
分类:
移动开发 时间:
2015-01-06 12:03:55
阅读次数:
179
- (NSString *)getCIELABString:(UIColor *)originColor {
// Method provided by the Colours class extension
NSDictionary *cieDict = [self
getCIE_LabArrayByColor:originColor ];
return [NSS...
分类:
移动开发 时间:
2015-01-06 11:56:51
阅读次数:
173
//根据颜色创建一个图片
+?(UIImage?*)createImageWithColor:(UIColor?*)color?rect:(CGRect)rect
{
????UIGraphicsBeginImageContext(rect.size);
????CGContextRef?context?=?UIGraphicsGetCurr...
分类:
移动开发 时间:
2015-01-05 15:10:06
阅读次数:
212
1. 直接给View设置背景
self.view.backgroundColor = [UIColor colorWithPatternImage:
[UIImage imageNamed:@"1.jpg"] ];
2.给UIScrollView 设置背景图片
这个一般在图片较大,并且视图需要滚动时候使用。 原理都一...
分类:
移动开发 时间:
2015-01-05 09:34:24
阅读次数:
132
//绘制多图形(继承UIView)- (void)drawRect:(CGRect)rect{ UIColor *color = [UIColor redColor]; [color set]; UIBezierPath *path = [UIBezierPath bezierPath]; ...
分类:
其他好文 时间:
2015-01-03 11:50:39
阅读次数:
247