2009-10-31 2 views

Répondre

0

Eh bien, quelque chose comme cela fonctionne:

UIButton *button1 = ... // (allocate this and initialize it) 
UIButton *button2 = ... // (allocate this and initialize it) 

UIScrollView *scrollView = ... // (allocate this and initialize it) 

[scrollView addSubview:button1]; 
[scrollView addSubview:button2]; 

C'est fondamentalement la façon dont vous ajoutez 2 boutons à un UIScrollView. Maintenant, si vous voulez en faire plus, comme les mettre de façon à ce qu'un seul soit visible à la fois ou quelque chose, placez l'image de chaque bouton à l'intérieur des limites scrollView.contentSize.

Questions connexes