使用mfmailcomposeviewcontroller时,如何更改UIBarButtonItem的标题?我不想要文本"取消"/"发送",也不需要保存/删除草稿选项,当用户点击"取消"时,该选项会提示用户。
你不能。MFMailComposeViewController不可自定义。
您可以更改Info.plist中的Development Region,以便翻译您的系统按钮,或者在应用程序中添加翻译,系统按钮将翻译为用户选择的语言。
注意:这可能是这个问题的重复
这是因为您用系统项"style"UIBarButtonSystemItem
设置了它。
你可以使用这些,或者使用自定义的:
- UIBarButtonSystemItemDone,
UIBarButtonSystemItemCancel,
UIBarButtonSystemItemEdit,
UIBarButtonSystemItemSave,
UIBarButtonSystemItemAdd,
UIBarButtonSystemItemFlexibleSpace,
UIBarButtonSystemItemFixedSpace,
UIBarButtonSystemItemCompose,
UIBarButtonSystemItemReply,
UIBarButtonSystemItemAction,
UIBarButtonSystemItemOrganize,
UIBarButtonSystemItemBookmarks,
UIBarButtonSystemItemSearch,
UIBarButtonSystemItemRefresh,
UIBarButtonSystemItemStop,
UIBarButtonSystemItemCamera,
UIBarButtonSystemItemTrash,
UIBarButtonSystemItemPlay,
UIBarButtonSystemItemPause,
UIBarButtonSystemItemRewind,
UIBarButtonSystemItemFastForward,
UIBarButtonSystemItemUndo,//iOS 3.0及更高版本
UIBarButtonSystemItemRedo,//iOS 3.0及更高版本
UIBarButtonSystemItemPageCurl,//iOS 4.0及更高版本
哦,我没有看到标题中的"翻译"。。