Set First Responder in MFMailComposeViewController?

后端 未结 4 1451
南笙
南笙 2020-12-18 05:25

I\'m using Apple\'s MailComposer example application to send email from within my application (OS 3.0 functionality). Is it possible to set the To, Subject, or Body fields a

4条回答
  •  猫巷女王i
    2020-12-18 05:55

    You can try just calling becomeFirstResponder on the controller itself. If that doesn't work, you can try in the debugger getting the list of subviews of the mail compose view until you find a familiar textfield or textview which you can then code specifically to set the responder status in code, which might look something like this (i don't know if this will work but it's an example):

    [[[[mailcomposer.view.subviews objectAtIndex:3] subviews] objectAtIndex:2] becomeFirstResponder]
    

提交回复
热议问题