开发者

Issue while adding 'Cc' Field in 'TTMessageController' (Three 20)

I am using the TTMessageController class for compose mail.There is only 'To' recepients Field in this class. I added the Cc Field in it. I have used this code:

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
  if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
    _fields = [[NSArray alloc] initWithObjects:
               [[[TTMessageRecipientField alloc] initWithTitle: TTLocalizedString(@"To:", @"")
                                                      required: YES] autorelease],  
               [[[TTMessageRecipientField alloc] initWithTitle: TTLocalizedString(@"Cc:", @"")
                                                      required: YES] autorelease],  
               [[[TTMessageSubjectField alloc] initWithTitle: TTLocalizedString(@"Subject:", @"")
                                                    required: NO] autorelease],
               nil];

    self.title = TTLocalizedString(@"New Message", @"");

    self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc]
                                              initWithTitle: TTLocalizedString(@"Cancel", @"")
                                              style: UIBarButtonItemStyleBordered
                                              target: self
                                              action: @selector(cancel)] autorelease];
    self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc]
                                               initWithTitle: TTLocalizedString(@"Send", @"")
                                               style: UIBarButtonItemStyleDone
                                               target: self
                                               action: @selector(send)] autorelease];
    se开发者_运维百科lf.navigationItem.rightBarButtonItem.enabled = NO;
  }

  return self;
}

When I type anything in 'To' or 'Cc' field , two lists are appearing as search result:- One for 'To' field and second for 'Cc' Field. I want to show only one list according to 'To' or 'Cc' Field.

Please suggest me any idea how can I resolve it or some other better way to implement my requirements?

Thanks

Deepika


There is now a Sample app at GitHub under the Samples that shows a way to handle this.

https://github.com/Three20/Samples/tree/master/MultiRecipients

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜