English 中文(简体)
WEPopover 主计长是显示箭头的 t,与UIPopover一样。 主计长
原标题:WEPopoverController isn t showing the arrowhead - works the same as UIPopoverController

我在用户发出一个顿子时有这一代码:

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头,或环绕角。

我如何看待这些想法?

最佳回答

下面是Popover(即从WEPopoverTableView中选取)的代码。

UIViewController *contentViewController = [[WEPopoverContentViewController alloc] initWithStyle:UITableViewStylePlain];

CGRect frame = [tableView cellForRowAtIndexPath:indexPath].frame;

self.popoverController = [[[WEPopoverController alloc] initWithContentViewController:contentViewController] autorelease];
[self.popoverController presentPopoverFromRect:frame 
                                            inView:self.view 
                          permittedArrowDirections:UIPopoverArrowDirectionDown|UIPopoverArrowDirectionUp
                                          animated:YES];

currentPopoverCellIndex = indexPath.row;
[contentViewController release];
问题回答

• 确保你把Gite Hub的WEPopoverController拍摄的图像包括在内。 它包括各个方向的arrow,以及人群的背景。





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签