0

我是一个新的 Mac 程序员,我正在尝试做一些事情,比如:使用 Obj-c

... == Something that I know how to do

...

...

wait (for user)

button clickd (some button)

if button 1 clickd {

...

wait (for user)

button clickd (some button)

if dutton 1 clickd {

...
 } 

else if dutton 2 clickd {
... 
}
}

else if button 2 clickd {

...
 }

else {

...
 }
4

1 回答 1

0

Move your else if block to separate methods and use setAction: to connect a button and its action method . You can also use Interface builder to connect methods to buttons.

于 2011-04-27T05:55:44.710 回答