I want to show the subview of a scene in popover. To expand,
I have a main view controller. I run a subview 'Song Listview' in this Main View Controller. I have a button named 'list' in 'mainViewController'. I want to show the song in popup to click on the button 'List'.
So, how should I do this?
You can use the code below as a reference to show pop over from a UIButton
- (zero) Button: (ID) Sender {// Custom popover view UIViewController * popoverContent = [[UIViewController alloc] init]; UIView * popoverView = [[UIView alloc] initWithFrame: CGRectMake (0, 0, 200, 300)]; PopoverView.backgroundColor = [UIColor green color]; PopoverContent.view = popoverView; // popework view resize size by viewing popoverContent.contentSizeForViewInPopover = // CGSizeMake (200, 300); // Create a popover controller self.popoverController [[UIPopoverController alloc] initWithContentViewController: popoverContent]; // Populate shows non-modal views with buttons pressed within the current view [self. PopOver Controller Current Pops Frame: Popup Button See in the frame: self Visual permissions arrowroot direct: UIPOpero DIRECTION ANY animated: Yes]; // popover content release [popoverview release]; [Popover content release]; }
Comments
Post a Comment