I was looking to replicate the button grid bar that Facebook uses in their app here:
The left button is unpressed, the right is pressed.
I'm having trouble replicated the "pushed" button status. Can anyone help? Here is what I've got so far:
I'm pretty satisfied with most of it. Just gotta brush up the sizes of the buttons but that's trivial. On my toolbar, the left button is supposed to be pushed and the right isn't. Clearly I'm missing that drop shadow on the top that Facebook implements in there's. How can I replicate this? I was thinking of using TTInnerShadowStyle
but couldn't seem to get it right. here is the code that generates the style for each button:
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;
Any help would be greatly appreciated. Thanks!