tags:

views:

39

answers:

1

recently i have switched from Android to iPhone.....could any one let me know what is the alternete code in Objective c...Thankx in Advance

etName = (EditText) findViewById(R.id.etName);

name = etName.getText().toString();
+2  A: 

@talktobijju As David says, you create a text field like so in your controller.

// code in the interface
IBOutlet UITextField *etName;

Then you connect the text field UI GUI element in Interface Builder to etName in your controller. Afterwards, you can access the data that's typed into the text field like so.

// code in the implementation
NSString *textFieldString = [etName text];

I would look at some iPhone tutorials that provide more detail in how to setup and use UITextField.

charlie hwang
Thank You charlie hwang
talktobijju
plz accept my questions plz coz whenever i ask any question regarding iPhone this msz appear on the screen "Sorry, we are no longer accepting questions from this account. "
talktobijju
your questions are accepted when two things happen: someone places an answer for your question and you mark it as accepted.
charlie hwang