I am trying to create an alert that when brought up will ask the user if they want to select a photo from their library or take a photo. I am working off of a template from the post UIPopover How do I make a popover with buttons like this?. The template is...
UIAlertController * alertController = [UIAlertController alertControllerWithTitle: nil
message: nil
preferredStyle: UIAlertControllerStyleActionSheet];
[alertController addAction: [UIAlertAction actionWithTitle: @"Take Photo" style: UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
// Handle Take Photo here
}]];
[alertController addAction: [UIAlertAction actionWithTitle: @"Choose Existing Photo" style: UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
// Handle Choose Existing Photo here
}]];
alertController.modalPresentationStyle = UIModalPresentationPopover;
UIPopoverPresentationController * popover = alertController.popoverPresentationController;
popover.permittedArrowDirections = UIPopoverArrowDirectionUp;
popover.sourceView = sender;
popover.sourceRect = sender.bounds;
[self presentViewController: alertController animated: YES completion: nil];
however at popover.sourceRect = sender.bounds;
xcode gives me an error that states Property 'bounds' not found on object of type '__strong id'
. What is this error saying and how is this fixed?