You can try this
if ([controller respondsToSelector:@selector(setModalPresentationStyle:)])
{
[controller setModalPresentationStyle:UIModalPresentationFullScreen];
} else {
[controller setModalPresentationStyle:UIModalPresentationFormSheet];
}