开发者_StackOverflow
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this questionI have a view with 14 buttons, it looks quite ugly now. I use round rect button, and put the buttons 7 each side.
Maybe someone could recommend me some good custom button style?
here comes the screenshot.
I don't see any way to reduce number of buttons, so may be I can change the button style to make it look better, any recommend button style?
![How to deal with a view with 14 buttons? [closed] How to deal with a view with 14 buttons? [closed]](https://i.stack.imgur.com/lRz1i.png)
I use the following approach ... In cases like this I use Custom buttons which are something as in image
![How to deal with a view with 14 buttons? [closed] How to deal with a view with 14 buttons? [closed]](https://i.stack.imgur.com/8OfRB.png)
Now there are two appraoches to access individual button First being taking individual IBoutlets and connect each of the button one by one
IBOutlet UIButton *_eventButton;
IBOutlet UIButton *_programButton;
IBOutlet UIButton *_sponsorsButton;
IBOutlet UIButton *_speakersButton;
IBOutlet UIButton *_mapsButton;
IBOutlet UIButton *_socialButton;
IBOutlet UIButton *_aboutButton;
and second being creating an IBOutletCollection and connect all these button to a single outlet //Alternative Approach
IBOutletCollection (UIButton*) NSArray* mainButtonPanelArray;
Accordingly There can be either 8 different Methods
or a Single Method to access all the Button's Event
-(IBAction*)mainPanelButtonPressed:(id)sender{ UIButton* btn = (UIButton*)sender; NSinteger buttonTag = btn.tag;
switch(buttonTag){
case 111 :
break;
//and so on…
default:
break;
}
}
While The better User Interface would come with using custom Buttons with Images along.
Hope it helps
Create the image you want, use it as the background for a Custom button. The button can be a diamond, a circle, a picture of a cat -- whatever image you choose.
加载中,请稍侯......
精彩评论