我在用户发出一个顿子时有这一代码:
SettingsViewController *settingsViewController = [[SettingsViewController alloc] init];
WEPopoverController *popover = [[WEPopoverController alloc] initWithContentViewController:settingsViewController];
[popover setDelegate:self];
[popover presentPopoverFromRect:settingsWheel.frame
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionUp
animated:YES];
[popover setPopoverContentSize:CGSizeMake(150, 200)];
Then in settings view controller, I have this:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.view.backgroundColor = [UIColor blueColor];
self.contentSizeForViewInPopover = CGSizeMake(150, 200);
}
return self;
}
但出于某种不了解的原因,它只显示背景的蓝广场,而不是arrow头,或环绕角。
我如何看待这些想法?