Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- + (void)showOnViewController:(UIViewController*)parentVC
- {
- WDDNotificationsViewController *notificationsViewController
- = [parentVC.storyboard instantiateViewControllerWithIdentifier:NSStringFromClass(self)];
- notificationsViewController.parentVC = parentVC;
- WYPopoverController *popoverController = [[WYPopoverController alloc] initWithContentViewController:notificationsViewController];
- parentVC.notificationsPopover = popoverController;
- popoverController.theme.innerCornerRadius = 0.0f;
- popoverController.theme.outerCornerRadius = 0.0f;
- popoverController.theme.viewContentInsets = UIEdgeInsetsZero;
- popoverController.theme.borderWidth = 3.0f;
- popoverController.theme.arrowBase = 24.0f;
- popoverController.theme.arrowHeight = 14.0f;
- popoverController.theme.arrowBaseOffset = 22.0f;
- popoverController.theme.arrowHeightOffset = 10.0f;
- popoverController.theme.outerStrokeColor = NOTIFICATIONS_GRAY_COLOR;
- popoverController.theme.strokeWidth = 1.25f;
- popoverController.theme.fillTopColor = [UIColor whiteColor];
- popoverController.theme.fillBottomColor = [UIColor whiteColor];
- popoverController.delegate = notificationsViewController;
- CGRect frame = parentVC.navigationItem.titleView.frame;
- frame.size.height = frame.size.height - NOTIFICATIONS_BADGE_HEIGHT / 2 + 1;
- [popoverController presentPopoverFromRect:frame
- inView:parentVC.navigationItem.titleView.superview
- permittedArrowDirections:WYPopoverArrowDirectionUp
- animated:YES];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement