开发者

How to deal with a view with 14 buttons? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
开发者_StackOverflow

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

Improve this question

I 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]


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]

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜