I'm trying to make a sharing app extension to handle URLs from Safari. The XCode project template provides a ViewController that is a subclass of SLComposeServiceViewController
. My problem is that my extension is not going to fit into the "standard" sharing template - I need to provide a custom UI for it. So I changed the parent class to the normal UIViewController. My extension continues to load fine in Safari - but I can't figure out how to size the UI similar to the SLComposeServiceViewController
.
My ViewController is initing with full width x height of the device and even after I call [self setPreferredContentSize:CGSizeMake(320.0f, 320.0f)];
which is recommended if AutoLayout is not used, as a test to see if the size is reduced, nothing happens.
I've tried this in both the simulator and on my iPad with iOS 8 beta 5.