Search code examples
iphonexcodequickdialog

when setQuickDialogTableView being called in quickdialog box


I am working on an example codes at here and my target is to customized the font and color of log in cell

These method below are setting proper delegate class to the table view

- (void)setQuickDialogTableView:(QuickDialogTableView *)aQuickDialogTableView {
    [super setQuickDialogTableView:aQuickDialogTableView];

    self.quickDialogTableView.backgroundView = nil;
    self.quickDialogTableView.backgroundColor = [UIColor colorWithHue:0.1174 saturation:0.7131 brightness:0.8618 alpha:1.0000];
    self.quickDialogTableView.bounces = NO;
    self.quickDialogTableView.styleProvider = self;

    ((QEntryElement *)[self.root elementWithKey:@"login"]).delegate = self;
}

My question is :

how this method being called during the running time.
I did pull the sample project and took a look inside but still have had no clues how it is being triggered at all

Please advice me on this issue and all comments are welcomed here

Thanks


Solution

  • QuickDialog developer here.

    This method gets called when the QuickDialogController sets its quickDialogTableView property to the new QuickDialogTableView instance, in the loadView method:

    - (void)loadView {
        [super loadView];
        self.quickDialogTableView = [[QuickDialogTableView alloc] initWithController:self];
        self.view = self.quickDialogTableView;
    }
    

    In the method above, I'm using the dot notation to set the self.quickDialogTableView object, but this could also have been written as [self setQuickDialogTableView:...]. They mean the same thing.

    The loadView method is called automatically by iOS when the ViewController gets presented.