我在我的MFMailComposeViewController
身体部位使用光标
- (BOOL) setMFMailFieldAsFirstResponder:(UIView*)view mfMailField:(NSString*)field{
for (UIView *subview in view.subviews) {
NSString *className = [NSString stringWithFormat:@"%@", [subview class]];
NSLog(@"SubView -- %@ --- %@",className,field);
if ([className isEqualToString:field])
{
//Found the sub view we need to set as first responder
[subview becomeFirstResponder];
return YES;
}
if ([subview.subviews count] > 0) {
if ([self setMFMailFieldAsFirstResponder:subview mfMailField:field]){
//Field was found and made first responder in a subview
return YES;
}
}
}
//field not found in this view.
return NO;
}
但它在身体部位的第一个字符上显示光标。如果想要光标在两行之后,比如
这是邮件的正文部分,我希望将光标放在此消息的两行之后。
我正在使用 [picker setMessageBody:emailBody isHTML:YES];
set body part ,我需要isHTML
YES。