开发者

How To Make A UIButton Match My NavBar?

开发者 https://www.devze.com 2023-02-27 05:12 出处:网络
I have a custom color navbar using the following co开发者_如何学Gode: self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:35/255.0 green:161.0/255.0 blue:202.0/255.0 alpha:1.0];

I have a custom color navbar using the following co开发者_如何学Gode:

self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:35/255.0 green:161.0/255.0 blue:202.0/255.0 alpha:1.0];

I want to make a UIButton with the exact same color and gradient that the navbar is. I've tried in photoshop but don't know how to make the 2 tone graident style.

Is there anyway to do this programatically? I already have the buttons set up in IB.


Check out this link. There you can find a class that extends UIButton, so that you can change the color of your buttons and even do some gradient.

0

精彩评论

暂无评论...
验证码 换一张
取 消