开发者

populate uipopover with thumbs and text

I'm drawing a popover after a button clicked and I wish view into t开发者_运维技巧he popover a grid with a square thumb of an image and some text....

thanks!


If I understand your question right, you want to have a custom view in your UIPopovercontroller. This can be done by creating a new UIViewController, with its own content.

Then load you popovercontroller from the class you load the action from. Example:

myView *theView = [[myView alloc] initWithNibName:@"myView" 
                                           bundle:nil];

UIPopoverController* aPopover = [[UIPopoverController alloc] initWithContentViewController:theView];
[aPopover setDelegate:self];
[aPopover setPopoverContentSize:CGSizeMake(320, 320) animated:YES];

[theView setPopover:aPopover];
[theView release];

[self.popoverController presentPopoverFromRect:CGRectMake(510,370,0,0) inView:self.view  permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜