jvlin / temperatureConverter

0 stars 0 forks source link

Please review code #1

Open jvlin opened 10 years ago

jvlin commented 10 years ago

@timothy1ee @nesquena

I was wondering if you can tell me how to put the convert button on the keyboard instead of on the screen. Also I wasn't sure which one took precedence when there are values in both F and C text fields.

Is IBAction preferred over using target and action selector to handle button click event handling?

timothy1ee commented 10 years ago

Looks good! Read this for customizing the keyboard: http://blog.carbonfive.com/2012/03/12/customizing-the-ios-keyboard/

IBAction is equivalent to target and selector, neither are preferred.

jvlin commented 10 years ago

I wanted to detected the last changed textfield but wasn't sure how to do it. Can you please elaborate on what you mean by setting delegates? Do I use this technique to determine which one was edited most recently?

timothy1ee commented 10 years ago

When an UITextField is being edited, the isEditing property is YES. Or, when the user begins editing in a textfield, you can store the active textfield in a property like activeTextField.

Many UI elements like UITextField, UITableView, UIAlertView have events associated with them. For example, a user has begun editing, finished editing, changed text, etc.

See this video for an example of how to set and use the UITextField delegate: http://www.youtube.com/watch?v=c5SRKfGiHSg

jvlin commented 10 years ago

Thanks, I've added and committed delegate codes to convert the last edited field and to convert when return button is pressed.

timothy1ee commented 10 years ago

Great, looks good.