Denny
Denny

Reputation: 1230

iPhone - Proper UI controls for calculations

I am pretty new to iPhone development and currently working on an application which includes a view that performs a simple numerical calculation. In particular, the user enters 3 or 4 values into text fields and the view displays the result. Something along the lines of http://www.moneychimp.com/calculator/compound_interest_calculator.htm

What is the nicest way to achieve this? I am currently using simple UITextFields and a UILabel for the result but it doesn't look nice or "native-like". What UI object would be best to use?

Thank you!

Upvotes: 1

Views: 146

Answers (3)

Wilbo Baggins
Wilbo Baggins

Reputation: 2751

I'd say;

  • use a grouped table style (with the white tables with round corners on a blueish striped background)

  • embed settings values directly in the cell (aligned to the right) as much as possible

  • you can show a relevant keyboard (text, numbers) or picker view to let the user pick values, directly when they tap the cell. Use sliders and switches where relevant.

You may want to take a look at http://www.inappsettingskit.com/, we are currently investigating it for the same purpose and it seems to do the job

Upvotes: 1

kevboh
kevboh

Reputation: 5245

It's entirely up to you. You're using the right classes for actual input- it comes down to how you choose to style those classes. I'd suggest looking at the documentation for UIView and CALayer (youView.layer, and include QuartzCore framework in your project).

A good start might be to choose a color scheme, a background for your app, and the look and feel you're shooting for- this will inform your styling. Try looking for apps that you think are elegant and attractive, and boil down what they do and what you like about them.

Upvotes: 1

Tyler Zale
Tyler Zale

Reputation: 634

You can use either a UISlider or a UIPickerView if some of your values have limits. You can use UISwitch for toggles. You can also switch the default keyboard for your textfields to be numeric.

Other than that you seem to be on the right track.

Also, sometimes putting a view inside a scrollview makes things seem cooler even if its only one page. The auto bounce on scrollviews is kind of cool.

Upvotes: 0

Related Questions