En orientation portrait, je mesure 744px de hauteur. Je veux changer cette hauteur quand il est en mode paysage. Comment puis-je faire ceci?Comment redimensionner ma vue en orientation horizontale?
0
A
Répondre
1
Dans l'inspecteur de dimensionnement d'Interface Builder, définissez les "Struts & ressorts" pour le comportement de redimensionnement souhaité. Si vous souhaitez contrôler la taille par code, créez simplement un CGRect
et définissez le cadre de la vue sur le rectangle.
0
Vous devez remplacer la méthode (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
dans votre contrôleur de vue. Dans la méthode redéfinie, vous devez appeler la méthode superclasse, puis redimensionner votre vue de manière appropriée.
Questions connexes
- 1. Comment puis-je modifier ma vue en orientation horizontale et revenir en mode portrait?
- 2. La vue modale n'apparaît pas au centre en orientation horizontale
- 3. Rejet d'une vue modale dans une orientation horizontale?
- 4. WPF TreeView avec orientation horizontale?
- 5. Aligner UIActivityIndicator à côté de UILabel en orientation horizontale
- 6. Orientation horizontale de DataGrid dans Silverlight 4
- 7. Orientation horizontale dans le contrôle répéteur
- 8. Comment puis-je centrer mon image dans une orientation horizontale?
- 9. WrapPanel ne s'enroulant pas dans un StackPanel avec orientation horizontale
- 10. comment arrêter ma page html redimensionner
- 11. Comment forcer l'orientation horizontale?
- 12. Afficher résultat de requête MYSQL en vue horizontale
- 13. Changer de vue avec une orientation différente
- 14. Comment gérer ma vue d'application
- 15. Vue arborescente très personnalisée/horizontale dans Flex
- 16. UIViewController: définir self.view sur ma vue ou ajouter ma vue en tant que sous-vue?
- 17. UITextField en orientation paysage
- 18. Redimensionner la vue sur l'iPhone lors de la rotation
- 19. Comment créer une vue défilante horizontale sur iPhone?
- 20. Redimensionner l'image en Java. Comment redimensionner
- 21. UITableView orientation
- 22. Comment créer une vue défilante horizontale pour l'iPhone?
- 23. Comment redimensionner UIScrollView en rotation?
- 24. Clavier bloquant ma vue
- 25. UIPageControl en orientation paysage
- 26. UIImagePickerController en orientation paysage
- 27. UIDEVICE orientation
- 28. Comment obtenir Model.Value dans ma vue. en utilisant asp.net mvc
- 29. C# comment empêcher l'utilisateur de redimensionner ma fenêtre d'application?
- 30. Comment puis-je obtenir l'élément après que ma barre de navigation horizontale CSS s'affiche en dessous?