我的理论是:
-----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,因为它无法自定义。