Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

brsboarder

macrumors 6502a
Original poster
Feb 16, 2004
763
15
I have no programming experience but am wondering how I can create a simple app.

I basically want to be able to input 3 variable called:
STE
QTc
RAV4
and put them in this formula to reveal a number:
(1.196 x STE) + (0.059 x QTc) - (0.326 x RAV4)

Any simple way to do this? I use this formula on a very regular basis and it would be very nice if I could just input the numbers like I do into the excel file I made
 
You need 4 textFields + 1 button to calculate
You connect them to your controller using ctrl + drag (4 outlets & 1 action)
the action will perform the calculation using the text of the first 3 textFields which you should convert to a double
the result you fill the text property of the last textField with
 
What is your goal in this? Are you just wanting an app that gives you the result? Or are you wanting to learn some iOS programming as well? If it's the former, you can probably find a pre-existing app that can calculate this for you. If it's the later, be prepared to spend a bit of time becoming comfortable with the fundamentals of iOS programming before even a simple program like yours seems attainable.
 
Last edited:
The calculation is easy enough, and the UI is simple enough, that a simple HTML web page with a little JavaScript could easily accomplish this.

Put the resulting web page on any public server, such as an Amazon AWS page, and bookmark it in your browser.

There are also several programming languages for iOS on the App Store (Python, Basic, etc.). One of those could easily do this calculation.
 
The easiest solution would be to hire a grad student to do this for you. Not making the app, that would be too interesting. Instead, have the graduate student perform this calculation as often as you want, and if they can't keep up with you, yell at them.
 
Threw together a pretty simple project that does what you want. Though if you're really interested in iOS development I would suggest only using it as a rough guide. Maybe try to add new things to it, like images, or figure out how to get the result to show the answer to more decimal places.
 

Attachments

  • Calculation.zip
    114.7 KB · Views: 120
  • Like
Reactions: grandM
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.