Lock Screen Orientation

Looking for code to prevent a user from going landscape on a particular view controller only for an iPhone. The user should be able to rotate the view to landscape on an iPad only on the view controller.

hello how can i to do ?

Lock Screen Orientation
 
 
Q