简体   繁体   English

为iPhone的文本或电子邮件添加进度条(UIProgressView)

[英]Adding progress bar (UIProgressView) for text or email for iPhone

Does anyone have tutorials or code snippets to add a Progress Bar for the MFMessageComposeViewController and MFMailComposeViewController? 有没有人有教程或代码片段来为MFMessageComposeViewController和MFMailComposeViewController添加进度栏? I'm assuming you could add a progress bar as a subview, but not really sure. 我假设您可以将进度条添加为子视图,但不确定。 Thanks. 谢谢。

I would be hesitant about trying to modify those view controllers. 我会犹豫要修改那些视图控制器。 The documentation specifically says that you shouldn't try to mess with them in that way, as they are meant to be displayed "as is". 该文档特别指出,您不应尝试以这种方式弄乱它们,因为它们应按原样显示。 In any case, why don't you try adding a UIProgressView to the view controller's view? 无论如何,为什么不尝试将UIProgressView添加到视图控制器的视图? If not, you could add it directly to the window—generally ill-advised—at the appropriate time and remove it when you're done. 如果没有,您可以在适当的时候将其直接添加到通常不建议使用的窗口中,并在完成后将其删除。

By the way, why are you trying to add a progress view to those view controllers? 顺便说一句,为什么要尝试向这些视图控制器添加进度视图? Those controllers don't provide any sort of state about whether a message was sent successfully or not, only whether or not the user canceled the operation. 这些控制器不提供有关消息是否成功发送的任何状态,仅提供用户是否取消操作的状态。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM