更改“取消”按钮文本使用MonoTouch的一个的UISearchBar? [英] Change text of “Cancel” button on a UISearchBar using Monotouch?
本文介绍了更改“取消”按钮文本使用MonoTouch的一个的UISearchBar?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要更改取消按钮的文本,以便在我的应用程序中始终显示重置。
我发现很多类似问题在这里,但所有的答案是为ObjC,而我在Monotouch工作。
I need to change the text of the Cancel button to always display "Reset" in my app. I found many similar questions here on SO, but all answers are for ObjC, while I am working in Monotouch.
推荐答案
很容易 -
UIButton btnCancel = (UIButton)SearchBar.Subviews[3];
btnCancel.SetTitle ("test", UIControlState.Normal);
这篇关于更改“取消”按钮文本使用MonoTouch的一个的UISearchBar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文