Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

Forum Contest: Calculator App for iOS

Hi everybody,

It's time for another Treehouse Forum contest!

First, watch this video to learn more:

Please read the details below carefully. I'm looking forward to your entries!

How to Enter: Build your Calculator app as a native iOS app written in Objective-C. You can then either upload it to Github or zip up your project and provide a download link via Dropbox. Either way, post the link as a reply to this post.

Due Date: All entries must be submitted by January 19th at 11:45pm ET. Here's a timezone chart so you can see what time that is for your locale.

Prize: The entries will be judged by Treehouse teachers based on both design and code. One winner will receive a free month of Treehouse Gold on us! :) We'll announce the winner on January 20th and reveal the next contest.

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

This competition was very tough to judge because you all did an amazing job. There were some very unique approaches to this problem which is great because that's what being a app developer is all about. I'm happy to announce Olivier Andriessen as the winner of this contest. He built a fully functional calculator that accounted for the two screen sizes using Auto Layout, a simple design, easy to understand code, and an app icon. Congratulations to him and everyone that submitted an app!

Congrats Olivier!

fantastic. congrats to olivier and major big ups to everybody for participating. i love the community vibe here!

Well done Oliver! :)

Holger Liesegang
Holger Liesegang
50,595 Points

Great job, Olivier :)

...and keep on coding :-)

Kind Regards Holger

Thank you so much, it really means a lot :-)! And thank you all for creating such awesome apps, I think it's been a great motivator for us all.

Like Holger said: Keep on coding!

Cheers

Where is the next contest?

Exactly what I would like to know, where is the next contest?

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

A new contest will be announced next week. We will have contests on different topics every week. So the next iOS related contest will be next month. Stay tuned.

awesome!

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

Just thought I'd pop in here and let you guys know there is another iOS forum contest: https://teamtreehouse.com/forum/forum-contest-tictactoe-app-for-ios

67 Answers

Awesome! Haven't done anything iOS-related in a while so I'll have to brush up on the iOS development courses, but I'll definitely give this a shot!

Oh great!, I will work on it.

Great, nice job !

This is brilliant! I can't wait to enter!

Great, should it be compatible for both iPhone and iPad?

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

No, just the iPhone should be fine.

Ok!

Have the code written and running well...just need to design it now lol, lets see how this goes..

Rashii Henry
Rashii Henry
16,433 Points

do we get some type of accreditation for winning?

i want to be able to showcase treehouse as like a portfolio for all my learning.

Post your result on GitHub. For many companies out there, that's all the accreditation you need.

Rashii Henry
Rashii Henry
16,433 Points

okay, so just create a new repository on GitHub?

Are you saying i should post the code or the fact that i won?

Post the code to GitHub and if you win, you can include that in the repository. Just type some verbiage about it being a competition and refer the viewer to the PDF of your certificate or something like that. I'd make it a habit of including any side projects on GitHub. It's a pretty powerful site.

Hey Amit ,

I m really looking forward to this.... I dont know if i would be able to submit on time .... but will definitely submit.. and try my level best

I'm in!

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

Glad to see so many participants. Can't wait to see what you guys build. Good luck everyone!

Hi Guys!

Can't wait to get cracking, I joined Treehouse a few months ago to make iOS Apps but I didn't make many apps. But hopefully this will get me back on track to becoming an iOS developer.

Thank You :-)

Great idea! Let's make it happen ;) !

Cool! I've always wanted to learn to build an iOS app, and this contest is really motivating me!

Here is my entry for the contest: https://github.com/zdaz/Simple-Calculator.git

Nice, I'm adding mine tonight. Good Luck Zachary!

Good luck to you too! I just started learning Obj. C earlier this week so it was neat to talk with some friends to figure it out!

Very nice!

Here is my Calculator for the contest github

You can view screenshots via my portfolio || blog Code A²

Looks great!

Thanks! yours great too! I was thinking about coding a random quote, so that when the user pushes the Cleared button a new message should show up. I could even use the code from the prediction app.

*Yours looks great too. (edit is not working here)

That sounds like a cool idea! I'm trying to figure out how to get decimals working (limiting it to only one as well) and then add that in and probably erase the text at the bottom of mine.

Hayden Evans
Hayden Evans
15,399 Points

Nice job on the calculator and also on your website! I'm still thinking of cool ways to design one for myself and hope to have one up eventually. Your site is inspiring me to press forward on it!

Holger Liesegang
Holger Liesegang
50,595 Points

This is my version of the calculator in progress: GitHub

It's such a pity that I'm currently on tour in Germany so I'm only able to work on it when I'm having a pause at a Cafe/McDonalds/Starbucks ... and this weekend I even won't have cellular to update something (and no, I'm not expecting any McDonalds/Starbacks/etc. with WiFi where I'm going to be then :-) )

So good luck to everyone and use your time wisely :-)

Kind Regards Holger

Nice code Holger! keeping up with "DRY" I like that.

Holger Liesegang
Holger Liesegang
50,595 Points

Thank you, Aaron, I'll have a look at your version next week :-)

If you don't mind me asking, what is the code that you use to limit the decimal point to just one use? I'm having issues where I can type in as many as I want.

Holger Liesegang
Holger Liesegang
50,595 Points

Hi Zachary, it's fairly easy: you can test with a NSRange if there is already a @"." in the NSString of your display (in my code referred to as self.displayLabel.text) and if there isn't (NSNotFound) you add one :)

NSRange range = [self.displayLabel.text rangeOfString:@"."]; if (range.location == NSNotFound) { self.displayLabel.text = [self.displayLabel.text stringByAppendingString:@"."]; }

Kind Regards Holger

Thanks so much! I hadn't thought of that! I'll definitely use that on a future project!

Holger Liesegang
Holger Liesegang
50,595 Points

Added some more comments/documentation in code, optimized icons, fixed a small +/- bug and changed some other minor things...

somehow I missed your question. But looks like Zachary took care of it. :)

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

All great submissions so far and looks like this competition is heating up! Keep them coming!

Here is my submission on Github! I decided to build an addition calculator for kids, so I designed a kid-friendly app called "How many paws?". When a number is pressed, a corresponding image with a given # of paws appears. Here are some screenshots from the app. :)

Code-wise, I decided to program the app so that it takes a string of numbers and addition operators, then splits the numbers by scanning for addition signs. I then push the numbers into an array, convert them to integers, and calculate the sum. This approach allowed me to still display the numbers as they were being added, which is a great feature for kids so they don't have to hold numbers in working memory. If I were to include additional operations, however, I would approach the code differently, calculating as I go, rather than at the end.

Hope you enjoy the app! :)

We have a winner. Great job!

Haha thanks Stephen :)

I love it! great job :)

Hi Novall,

I really liked ur idea its a beautiful app.

Great Job!!!

+1 Awesome job Novall.

Thanks Aaron!

nawrouz karim
nawrouz karim
1,295 Points

It's a shame I can't take part in this challenge as I am still learning the basics, but I think these challenges are a great way to test your learning skills.

Matthew Mascioni
Matthew Mascioni
20,444 Points

I'm loving it, Novall! Damn, the competition is getting heated.

Figured I'd throw my entry into the hat: it's now alive on GitHub. I had a lot of fun, and trying to make it as lightweight as possible was cool. It looks best on the 4-inch iPhone's display, and here's a screenshot.

P.S. Swipe down with two fingers! (inspired by Tweetbot)

Hope you guys like it! :)

UPDATE: The latest commit brings iPhone 3.5inch screen size support.

UPDATE AGAIN: Better design.

Thanks Matthew! Same to you!

Love the color change! great touch! I'm going to keep that in mind for my next app. Great Job Matthew.

This has been so much fun.

I vote to have more competitions like this in the future so that everyone gets in the practice they need to become better programmers. Rails competitions, Javascript game competitions, etc. This is a great idea.

It would be cool to see what others come up with. I would like to see some things that people could make with Rails. Ruby looks like a fun language to code in.

Hi Guys,

Please do pardon me for the very elementary nature of the app. This forum contest has really encouraged me to make more apps!! and hopefully soon I'll get the skills to make the apps I want.

https://www.dropbox.com/s/18iakblz6pwnq6t/calculator.zip

Saad you did a great job! I like it. I remember my first app. After watching a simple youtube video I thought I understood it all. Here is a screen shot of 300+ view controllers connect together in what turn into VA Masons after about 6 months of work. My first app

Matthew Mascioni
Matthew Mascioni
20,444 Points

I like it, Saad! Totally goes outside the box. One suggestion; I'd use a UILabel for the title instead of a text field :)

Thanks Matthew!! will do so :-)

Here it is thephoto

Anyway, long story short I learned the hard way LOL.

LOL, thanks for the words of encouragement!! :-). This is actually the first app I didn't use a video tutorial for, all the other apps I made were literally copied step by step from a video.

Hi guys! I've uploaded my contribution to the contest to Github. I used the library DDMathParser which made easier to do the calculations. Cheers,

Awesome app Laura! Love your design -- very iOS 7-chic ;) Also cool that you used DDMathParser!

Thanks Novall! I'm glad you liked the design :)

Rashii Henry
Rashii Henry
16,433 Points

I think i may either submit tomorrow or friday.

This is great, i'm currently learning iOS so i won't be able to submit so soon but i'll definitely give it a try :)

kv ds
kv ds
5,554 Points

hi ! I do not think that Apple is going to use it by default on the iPhone 6 but ... here is the link to my calculator https://github.com/KevinDesloges/iCalculate :)

Hi Kevin, looks like a great start, check the operations. Sometimes I am getting the wrong answer.

kv ds
kv ds
5,554 Points

thank you, I still have much to learn, and I don't know why the result displays decimal but I will check my code and tried to settle it. ps. sorry for my english. héhé

Two days to go, hope i can make it! :)

Lachlan Mitchell
Lachlan Mitchell
9,278 Points

Here's my submission! I call it Swipe. Once you have it open and running, you simply tap the numeric keys and swipe in particular directions to perform operations!

  • Swipe up to add
  • Down to subtract
  • Right to multiply
  • Left to divide
  • Shake the device to clear all.

It's my first fully complete app! It now supports both screen sizes :D Maybe not the most efficient solution to the problem but it worked well within the time I had. I very much hope to work on it further over time. Thanks for the inspiration!

I've tried to follow iOS7 standard design principals, but you be the judge. Good luck everyone!

Lachlan, you did a great job man! +1

Lachlan Mitchell
Lachlan Mitchell
9,278 Points

Thanks so much! That means a lot!

original idea :)

Hi guys i really need ur help i made the project but the moment i upload it at github or dropbox the the image which i added are not showing up and the project is giving me an error. I dont know what is the correct way of uploading the project so that data or image files are nor lost.

Please help I have worked so hard for it and at the last moment things are not working out. I mean the project is working fine in my system but the moment i downlaod it from github or dropbox the files are not being copied.

Hi Rashu -- Make sure you're uploading the entire Calculator folder, not just the .xcodeproject file. For example, if your app is named "Calculator", you should have a Calculator folder, a Calculator.xcodeproj file, and a CalculatorTest folder. Try compressing the folder with these 3 contents. Hope that helps!

Hi novall ,

Thanks for replying back... my problem is that i have taken images from the web and downloaded them and set them as background image for my calculator buttons and provided them as supporting image files. now every thing is getting uploaded except those two file. i m getting all the three files u mentioned except the two image files.

Please help. I have worked so hard and now the last moment its not happening.

Simple neon looking addition calculator. Allows add positive and negative integers. NeonCalculator

Well done Nadexda.

Well done Nadezda, I like the colors.

Hi guys sharing the link for my App. https://github.com/RashuBhatnagar/iosCalculatorApp

This is my first App ever... I hope you guys like it!!!!

Looking good! nice job with the buttons!

Thanks Aaron, Your comments really mean a lot... Its my first App ever. I really want to thank Treehouse to make it happen... HOpe to learn a lot here.

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

One day left for submissions and so far I'm impressed with everything I have seen. This is going to be a very tough decision. Although, you should be proud that you built something. I cannot stress how important it is to apply what you learn because practice makes perfect :)

Thank you Treehouse for all the awesome videos, found making this app a good practice after those videos on iOS development. Just uploaded my submission to GitHub. Good luck with writing people!

cool! I like the changing colours idea :D

Thanks, like your gradient design too!

Oliver nice job! love the color options!

Thanks, everyone is adding some features, so had to come up with something. Glad you like it!

Hi Olivier ,

Really a very pretty app and i really liked ur idea a lot....

Thanks Rashu, appreciate it. You also did a nice job with those buttons!

Colby Ludwig
Colby Ludwig
2,306 Points

Woo! Managed to get mine finished. I've put it up on Github here. Just a few minor things left to add (settings pane with night mode toggle + about this app), but I figured I might as well submit it now anyways.

Hi Cobly,

Very good app!!!!!

+1

Colby Well done! I like the display.

Jo Albright
Jo Albright
5,199 Points

Big thanks to the Treehouse team for the awesome library of tutorials you all have created. I also love that you put on these fun contests to help drive students to learn in different ways. I have written a blog entry about this contest experience. I plan on further developing this app, so I placed it on Github for others to contribute and use code from it.

Some highlights from my blog entry to quickly explain what has been built :

Functionality

[button] display

  • math operations [+], [-], [x], [/]
  • percent ... [4] 4 [%] 0.04
  • signing ... [4] 4 [+/-] -4
  • clear / all clear ... [4] 4 [c] 0 and [ac] clears last operation
  • decimal ... [4] 4 [.] 4. [6] 4.6
  • equals after operation ... [4] 4 [+] 4 [4] 4 [=] 8 [=] 12
  • operation after operation ... [4] 4 [+] 4 [3] 3 [-] 7 [2] 2 [=] 5

I always get annoyed when I accidentally hit the wrong number while in the middle of a multi-step formula. So I chose to add a "delete" button that removes numbers if they have just been input. It does not delete if the display is a result.

  • delete ... [4] 4 [5] 45 [del] 4 [del] 0

Design & Experience

  • works for both 3.5 & 4 inch displays
  • simple iOS 7 look with better touch and selected animations
  • resizable font size for display (like the original app)

App Icon

Screen Shot (+ button pressed)

Screen Shot

Jo Albright
Jo Albright
5,199 Points

Update


I have submitted this app to the app store. Anyone who chooses to contribute to this repo will have their name in the description of the app (description will be updated as often as possible). The main idea is to allow people who are looking for jobs, to be able to say they have worked on an app in the app store. I want this app to be able to do everything the Apple app does + more.

Dude.... AWESOME! loving the iface!

Hash tag awesome!!! love it. Great job Jo.

Nice design Jo. Like how the buttons animate!

I think a good idea would be to add a swipe jester to the interface. When you swipe across the screen it clears out the calculation. Lachlan Mitchell did this every well in his app.

Jo Albright
Jo Albright
5,199 Points

@aaronackerman I was hoping to add a swipe to show settings & configuration (ie : colors, fonts, etc) ... but I also like the idea of adding other gestures like shake or rotate to show operation history (kinda like the paper based accounting calculators).

Jo Albright
Jo Albright
5,199 Points

Thanks everyone for your kind words, please fork the repo. It is submitted as a free app and will never have ads or be monetized. I really would love to make this a fully open source supported app. This is an experiment for me, hopefully it will help me produce more purely open source iOS apps.

Paul Yorde
Paul Yorde
10,497 Points

SuperSweet man! Great design!

Jo Albright Shake gestures! I like that idea too!

Naomi Freeman
Naomi Freeman
Treehouse Guest Teacher

Aha came here to submit, thinking my app might have a chance. sad kitten

Good job Jo :)

I got mine to shake to clear the screen and do basic operators, but I can't even get my buttons to autolayout, so I moved them up the screen instead >.<

Oh well.

It'd be cool if Treehouse could address some of the challenges people faced in their apps.

Jo Albright
Jo Albright
5,199 Points

Naomi - Thank you for your kind works.

I really like the idea of Treehouse taking problems found from contests like this and making a follow up video with solutions.

If only I had a mac...

Lol.

What it's the hour deadline...? Thanks!

Due Date: All entries must be submitted by January 19th at 11:45pm ET. At the top of this forum, you can find a link to a timezone webpage.

Paul Yorde
Paul Yorde
10,497 Points

This has been such a great experience this week with this contest-project. I only just began IOS in the last few weeks, so when I first saw this contest announced, I didn't think I would enter. However, after a bit of google-ing, I found there are quite a few tuts out there for building a calc-app. I chose one from Lynda.com. All in all, I was challenged to get through the tutorial, design, and modify the app per constraints of the contest. I would just like to say that it's been quite lovely to see the submissions here, and to be a part of such a talented group of people. Cheers ~

My Project: (https://github.com/demetriusPop/Calculator/tree/master)

I like the split button for the + and = button. very nice touch.

Congrats Paul, may this be a first of many apps to come.

Cheers,

A.

Paul Yorde
Paul Yorde
10,497 Points

Nice looking design Dmitry. Nice touch with the pop-ups too. Oh, and I really liked the small display (top-right) of the equation entered.

Best, Paul ~

LOL love the popup coming soon!

/Users/Home/Desktop/iOS Programming/Calculator/Calculator.xcodeproj

anonymous do you need help uploading the project? because that link is not going to work. Head over to Github and upload it.

Lachlan Mitchell
Lachlan Mitchell
9,278 Points

It looks like you've tried to drag the project straight into the comment box, unfortunately it's a little more involved than that :)

Go to your desktop and open up your 'iOS Programming' folder. Then right click on the 'Calculator' folder and click 'Compress "Calculator"'. You'll now have a new compressed file called 'Calculator.zip'! Almost done.

Now all you have to do is upload that .zip file to a website where the treehouse staff can get to it! If I were you, I'd check out Dropbox. Just create an account quickly, upload the .zip you just made and then post the link here. If you need more detail, let me know :)

Hello, the truth is that this contest was great, until yesterday, Saturday, I started to work it through the whole night working on it because I'm fairly new but I hope you like it and give me feedback, this is my App on GitHub Greetings. Success to all.

Paul Yorde
Paul Yorde
10,497 Points

Cool looking stuff Abraham. This is my first app, so seeing segues like that in the storyboard was really interesting. Reminded me of a Midi Environment.

Thanks Paul! This is my first app to...

Rashii Henry
Rashii Henry
16,433 Points

how do i add my submission so when people click on the link it automatically downloads the project and opens on their computer?

You could upload it to Github and copy & paste the download link here. However its NOT going to open and run. That would require scripts.

Rashii Henry
Rashii Henry
16,433 Points

i appreciate it, but i added it.

Rashii Henry
Rashii Henry
16,433 Points

it's different, but it gets the job done. Here's my submission.

https://www.dropbox.com/s/t8cfecb3clo3frv/PlusCalculator%201.zip

Rashii, that is a mad crazy button layout.. I love it!

Looks good Well done!

Rashii Henry
Rashii Henry
16,433 Points

i appreciate it man, i just wanted to bring my perspective to the table and not be repetitive.

https://github.com/JinkProject/CleverCalc.git

A more extended version is already being worked on and will hopefully be finished in a couple of days. I'll finally have something on the app store!

+5 for the sound! dang.. I should have thought of that!

Thanks!

Everyone has such nice calculators! Good Job!

Mine is a simple gesture based calculator (gestures ftw!). You swipe up to add, down to subtract, left to divide, right to multiply, long hold to clear, and double tap to calculate. I was going to make all of the numbers also be controlled by gestures, but it was way too buggy and hard to use. Note that it only works on lager screen iPhones (5/5s).

https://github.com/EltaruAppsDev/Raknare-A-Simple-Calculator

I will eventually put it on the AppStore after adding more advanced features (scientific functions, multiple line support, iPhone 4/4s support, etc;) to it, I guess.

Here is my Calculator app for the IOS app contest. I really enjoyed this project since I just started in learning IOS a week and half ago. I would love some strong criticism and advice about my project. Thank can't wait for the next contest.

https://www.dropbox.com/s/110b2kbsg9g5ql0/CalculatorAppContest.zip

Hey there, I update my App in GitHub I have removed the orientations that at not supported and also added some screenshot.

The idea of ??the app is that you can change color depending on your preference or the color of your iPhone.

It is compatible with iPhone 3gs, 4,4 s, 5 and 5s.

Try it and give me your feedback. Thanks.

Here some screenshot...

Main Blue Rojo Green Yellow

You took this way to far man lol.

Hehehe Aaron Ackerman thanks bro, this means that "way to far" is good, right?

Yeah you did a good job :)

Thanks that's mean a lot for me man.

So who won?

What is the next contest?

Thank you so much, it really means a lot :-)! And thank you all for creating such awesome apps, I think it's been a great motivator for us all.

Like Holger said: Keep on coding!

Cheers

Congratulations Olivier Andriessen!

I think everybody is going to turn out to be great software engineers if they stick at it. Don't get daunted and don't let anything get in between you and your education (or don't try to it :P)!

I agree on that ;-)

+1

Rashii Henry
Rashii Henry
16,433 Points

i appreciate the motivation. it was reassuring.

Thanks a lot!