2012-07-26 38 views
0

我使用自定义视图来设置导航栏上的UIButton。自定义导航按钮,但文本不清晰,因为系统

但是,像下面的按钮上的文本:

enter image description here

不喜欢默认的按钮上的文字说清楚。

enter image description here

我尝试添加该按钮另一个标签,但似乎失败了。

我也绑这样的代码,但似乎也无法正常工作。

doneButton.titleLabel.layer.shadowColor = [UIColor blackColor].CGColor; 
doneButton.titleLabel.layer.shadowOffset = CGSizeMake(0, -1.0); 

回答

0

这些代码运行良好。

button.titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont smallSystemFontSize]]; 
button.titleLabel.textColor = [UIColor whiteColor]; 
button.titleLabel.shadowOffset = CGSizeMake(0,-1); 
button.titleLabel.shadowColor = [UIColor darkGrayColor]; 

我从https://github.com/boctor/idev-recipes这是自定义UI实现很大的得到它。