Presented View orientation with custom presentation style.

I am using a view controller A with a supported interface orientation set to 'portrait' to present a view controller B with a presentation style set to .custom. On rotating the device the presented view controller is getting rotated instead of just staying in 'Portrait'. And, If I use the .overFullScreen presentation style then the presented view controller stays in 'Portrait' as expected. I need to enforce presenting view controller's orientation to the presenting view controller with a custom presentation style. Please let me know if it's even possible with a custom presentation style.