2011-03-19 75 views
0

触摸时是否有放大按钮的方法?与编写短信时的键盘相似,您按下的按键会被放大,以便您可以看到您实际按下了哪个按键。iPhone上的放大按钮

回答

2

您也可以通过此方法做到这一点:

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; 

,当用户触摸你的按钮,然后你可以改变按钮的框架(buttton.frame)。

2

我建议你有你的按钮的两种不同appearers,它可以通过你的按钮状态来实现:Link to state

UIControlStateNormal, 
    UIControlStateHighlighted, 

现在,您需要使用下面的一组功能

- (void)setBackgroundImage:(UIImage *)image forState:(UIControlState)state 
- (void)setImage:(UIImage *)image forState:(UIControlState)state 
- (void)setTitle:(NSString *)title forState:(UIControlState)state 
- (void)setTitleColor:(UIColor *)color forState:(UIControlState)state 
- (void)setTitleShadowColor:(UIColor *)color forState:(UIControlState)state 

Read Apple Documentation

希望你能放大一下你的按钮。