I am creating a simple calculator application. I have 10 buttons labelled 0 through 9, and 5 buttons for the operations. I have an uitextfied which should be populated from the buttons. ie when the user click button 1, 1 should be entered in the field and so on. Also the value entered should be there even if the user taps another one. how to do that..pls help..
I am creating a simple calculator application. I have 10 buttons labelled 0 through
Share
You need to declare the textfield (and the buttons) as
Outletsin Interface Builder. Then you need to connect the touch up inside event of each button to a method. You can either have 10 methods which is one for each button or just one method and filter onidortag. In the button actions you can easily update the textfield by appending the the correct number.