1

enter image description here

I am working on Ipad application.in this application i use Subview over UISlider as above my Screen Shot show,with the value changed my Subview also get movement.my UISilder is nearly whole screen. i want to customize this Subview as Popupview.as my below Screen shot show.

enter image description here

I know how to use Popupview for another Class Xib,but for subview how to use it? Can any one guide me that Whether its possible to Customize Subview As PopupView?

4

2 回答 2

1

we did a custom popup view for the iPhone and the iPad in some of our application What we did is to like following

  • You will need an arrow image, this image will be a png small arrow that you will place according to the popup location
  • you will need a background image with corner borders, or you can use a normal image with no corner borders and use view.layer.cornerRadius = Value (we normally set Value = 8-12)
  • you then will need to do some calculation to find the exact location of the arrow image, and then organize your main popup view to be close to the arrow, this will give you the trick that the arrow is actually a part of the image ( you will have to have the same color for the arrow and the image)

I know these are general notes, but they will get you going You will not need to do alot of modification to the view you currently have

于 2012-06-11T08:40:54.407 回答
0

try this one hope will help you..

Make your view to which you want to make popover view … Lte say your view is… MyPopOverView .

MyPopOverView myPopOver = [[MyPopOverView alloc] initWithNibName:@"MyPopOverView" bundle:nil]; UIPopoverController popoverController = [[UIPopoverController alloc] initWithContentViewController:myPopOver];

[popoverController presentPopoverFromRect:(your slider rect) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];

于 2012-06-11T14:54:20.667 回答