0

我的层次是:

-----MainViewController with button, which open ViewController2 as modal;
 -----ViewController2 has button, which should open custom popoverview with ViewController3

问题是,costompopoverView 没有显示。

我的 popoverView 代码显示:

    -(IBAction)showPopoverAdressBar:(id)sender forEvent:(UIEvent*)event
{
    NSLog(@"Click");
    AdressBar *popoverControllesr = [[AdressBar alloc]init];
    popoverControllesr.view.frame = CGRectMake(0,0, 600, 45);
    popoverControllesr.delegate = self;
    popoverControllesr.view.backgroundColor = [UIColor whiteColor];
    mypopoverCotroller popoverController = [[mypopoverController alloc] initWithContentViewController:popoverControllesr];

    popoverController.cornerRadius = 20;
    if(_titles!=NULL){

        popoverController.titleText = _titles;}else{
            popoverController.titleText = @"Loading...";
        }
    popoverControllesr.address.text = absoluteString;



    popoverController.popoverBaseColor = [UIColor orangeColor];
    popoverController.popoverGradient= YES;

   popoverController.arrowPosition = myPopoverArrowPositionHorizontal;
    [popoverController showPopoverWithTouch:event];


}

我不需要 UIPopoverViewController,因为它不能自定义。

4

0 回答 0