我一直在寻找复制,Facebook的使用在这里他们的应用程序的按钮格栏:复制Facebook的使用three20 TTButtonBar,iOS的
左边的按钮是未按下,右边被按下。
我无法复制“推送”按钮状态。谁能帮忙?以下是我到目前为止有:
我很满意,大部分。只需要刷新按钮的大小,但这是微不足道的。在我的工具栏上,左边的按钮应该是推动的,右边的不是。很明显,我错过了Facebook上实现的顶部投影。我怎样才能复制这个?我正在考虑使用TTInnerShadowStyle
,但似乎无法做到。这里是生成每个按钮的样式代码:
UIColor *gradientFill1 = RGBCOLOR(249, 250, 252),*gradientFill2 = RGBCOLOR(225, 228, 235);
if (state != UIControlStateNormal) {
gradientFill1 = RGBCOLOR(233, 234, 237);
gradientFill2 = RGBCOLOR(214, 217, 223);
}
TTStyle *style= [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:3] next:
[TTInsetStyle styleWithInset:UIEdgeInsetsMake(1, 0, 1, 0) next:
[TTLinearGradientBorderStyle styleWithColor1:RGBCOLOR(140, 144, 150)
color2:RGBCOLOR(175, 179, 186) width:0.5 next:
[TTLinearGradientBorderStyle styleWithColor1:RGBCOLOR(184, 186, 192)
color2:RGBCOLOR(208, 212, 218) width:0.5 next:
[TTLinearGradientFillStyle styleWithColor1:gradientFill1
color2:gradientFill2 next:
[TTShadowStyle styleWithColor:RGBACOLOR(253,254,254,1.0) blur:0
offset:CGSizeMake(0, 1) next:
[TTImageStyle styleWithImageURL:nil defaultImage:nil
contentMode:UIViewContentModeScaleToFill
size:CGSizeZero next:
[TTTextStyle styleWithFont:[UIFont boldSystemFontOfSize:12.0f]
color:RGBCOLOR(81, 91, 120)
shadowColor:nil
shadowOffset:CGSizeMake(0, 0) next:nil]]]]]]]];
return style;
任何帮助将不胜感激。谢谢!
谢谢这可以工作。我正在寻找一种方法来完成它,同时仍然使用'TTButtonBar',而不必添加比所需更多的代码。想知道如果那是我的陷阱。 – ecbtln 2012-02-11 20:47:25