Less of a Ruby Motion but does anyone have any code examples or ideas on how to implement this?
I have a SplitView, and the master is a typical navigation of tabliviews... once you drill down a bit, and select an item, the selected PDF is pushed to the detailscontroller.
def tableView(tableView, didSelectRowAtIndexPath:indexPath)
controller = FileViewController.alloc.init
detailViewController = self.splitViewController.viewControllers[1]
detailViewController.pushViewController(controller, animated:true)
controller.setupDocumentControllerWithURL NSURL.fileURLWithPath("#{App.documents_path}/downloads/rocktown.pdf") ##hard coded for now
end
class FileViewController < UIViewController
...
@docInteractionController = UIDocumentInteractionController.interactionControllerWithURL url
@docInteractionController.delegate = self
@docInteractionController.presentPreviewAnimated true
What I really need is to hide the "action" menu for certain files, not really need to build my own menu item as in this thread
http://stackoverflow.com/questions/12766300/how-can-i-create-a-custom-uiactivity-and-uiactivityprovider-in-ios-6/12766330#12766330
This is the closest thing I have tried and it doesnt work due to "presentPopoverFromRect" is not a method of the controller.
ANY ideas would be very appreciated.
# activityVC = UIActivityViewController.alloc# initWithActivityItems:items, applicationActivities: [ca]
# activityVC.excludedActivityTypes = [UIActivityTypePostToWeibo, UIActivityTypeAssignToContact, UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeSaveToCameraRoll]
# @docInteractionController.popoverController = UIPopoverController.alloc.initWithContentViewController activityVC
# rect = UIScreen.mainScreen.bounds
# @docInteractionController.presentPopoverFromRect rect #, inView:self.view)#, permittedArrowDirections: 0, animated: true