Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Adjust arrow direction for UIActionsheet in iPad app
- float x=offset.x;
- float y=offset.y;
- float w=newPop.frame.size.width;
- float h=newPop.frame.size.height;
- if(offset.x < 150)
- {
- x = 160;
- w = w-180;
- }
- else if(offset.x > 600)
- {
- x= 600;
- //w= w+180;
- }
- CGRect myImageRect = CGRectMake(x, y, w, h);
- [newPop showFromRect:myImageRect inView:_calDay animated:YES];
- NSSet *allTouches = [event allTouches];
- UITouch *touch = [[allTouches allObjects] objectAtIndex:0];
- CGPoint p = [touch locationInView:self.view];
- if(popoverController)
- [popoverController dismissPopoverAnimated:YES];
- popOverController *obj_popOverController = [[popOverController alloc] initWithNibName:@"popOverController" bundle:nil];
- UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:obj_popOverController];
- popoverController = [[UIPopoverController alloc] initWithContentViewController:navController];
- [popoverController setPopoverContentSize:CGSizeMake(320.0, 320.0)];
- [popoverController presentPopoverFromRect:CGRectMake(p.x, p.y, 10, 10) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp | UIPopoverArrowDirectionDown animated:YES];
- [navController release];
Add Comment
Please, Sign In to add comment