Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7500215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:06:24+00:00 2026-05-29T20:06:24+00:00

I was looking to replicate the button grid bar that Facebook uses in their

  • 0

I was looking to replicate the button grid bar that Facebook uses in their app here:

enter image description 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:

enter image description here

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T20:06:26+00:00Added an answer on May 29, 2026 at 8:06 pm

    Indeed your code renders a little strange when adding TTInnerShadowStyle. But that seems to by caused by your double border style.

    If I insert an inner shadow after the fill and then move the both gradient borders be hide the inner shadow, it looks exactly as expected. The inner lighter border looks misplaced.

    I would recommend to use a combination of the “Chiseled button” and the “Inner shadow” examples from TTCatalog. It might look like this:

    [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:3] next:
    [TTShadowStyle styleWithColor:RGBACOLOR(255,255,255,0.9) blur:1
                           offset:CGSizeMake(0, 1) next:
    [TTLinearGradientFillStyle styleWithColor1:gradientFill1
                               color2:gradientFill2 next:
    [TTInnerShadowStyle styleWithColor:RGBACOLOR(0,0,0,0.7) blur:7
                                offset:CGSizeMake(0, 0) next:
    [TTSolidBorderStyle styleWithColor:black width: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]]]]]]]
    

    For the normal state just set the inner shadow color to transparent, or conditionally avoid the inner shadow completely.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, I'm looking for something that will allow me to replicate the following Perl
I'm looking to replicate and improve upon the following AlertDialog in my app: https://i.stack.imgur.com/aU3Ep.png
I would like to replicate the spinner effect that Spinrite displays in the upper-right
I am looking to replicate the image gallery view that shows thumbnails, like in
I'm looking for a tool that lets me replicate the database export and import
I'm looking to replicate the image zooming on this site: http://www.endless.com/adidas-Originals-adiracer-Trefoil-Sneaker/dp/B001I44OIG/183-5587133-4823042?ie=UTF8&cAsin=B001I44O2W&qid=1241466506612&asinTitle=adidas%20Originals%20adiracer%20Trefoil%20HG%20Sneaker&ref_=sw_1&asins=B001I44O2W%2CB001I457WS%2CB001LDJ2MM%2CB001HBH5LS%2CB001O9BJ4C%2CB001VNCNI2%2CB001LDJ7M2%2CB001LNNY44%2CB001LDJ2UE%2CB001OONDCS%2CB001HBH4FA%2CB001OOMWUW&refURL=%252Fb%252F241993011%253F&contextTitle=Search%20Results&fromPage=asinlist&suppressRedirect=1 When you mouse
Looking for an example that: Launches an EXE Waits for the EXE to finish.
Looking for a Linux application (or Firefox extension) that will allow me to scrape
I am looking to replicate a given object function across various model files As
I'm looking at implementing an app getting Twitter authorization via Oauth in Java. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.