Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 20, 2012, 04:10 PM   #1
fstigre
macrumors regular
 
Join Date: Aug 2008
What be the best way to create an app with a list of editable items

Hi,

What would be the best approach to create the app will describe next. I’m not looking for code; I just need to know what components you would use, especially for the item list shown in the picture.

This application is to practice what I have been reading about Objective-C.

What I want to do is to have two UITextfields, one to enter an amount and the other one to enter a percentage, I will also need a button that when clicked, it will do some calculations based on the numbers entered by the user, than displaying the result on a UILabel which is not a problem I can do this without a problem.

My issue is with the item list since I want to display the values entered by the user every time the add button is clicked, I also want the user to be able to edit and delete items in the lists, and as they are deleted or added the total should reflect these changes as well and I don’t know what would be the best way to accomplish this.

An array of UITextfields maybe? Is this how you would do it?

Any ideas would be greatly appreciated.

FYI,
None of this information will be saved in a database or anything like that, it will only be displayed while the application is in use.

Here is a link to a picture describing what I want:
https://www.evernote.com/shard/s157/...8d939ab2040f75

Thanks a lot.
__________________
MacBook (not the pro version) 2.4 GHz - 4 GB RAM - 160 GB HD - Snow Leopard - iphone First Generation
- Mac mini - 1.6GHz First Generation with Leopard
fstigre is offline   0 Reply With Quote
Old Nov 20, 2012, 04:18 PM   #2
jnoxx
macrumors 65816
 
jnoxx's Avatar
 
Join Date: Dec 2010
Location: Aartselaar // Antwerp // Belgium
Maybe you need to break it down in some easier steps, your sketch looks like a 20 minute job tbh.

First: Need 1 textfield for the amount & 1 for the percentage, great, good start.
If you are doing the button, do the calculation from the textfields, that's an harder start, since normal percentage from [amountTextfield.text floatValue] won't be good, you need to get into NSDecimal's etc.
Next up, you need an UITableView and an array containing objects.
Best is you make a custom object which inherits from NSObject, call it "CalculationObject", and make it have property's like, Amount, percentage, Total.
You can create this object each time you press the button mentioned above, save it to the array and loop over it in the UITableView + show it in the cell.
Seriously doesn't look like rocket science to me ^_-
Also, the editing is quite easy, this is all build in UITableView in the iPhone SDK

Maybe if you break it down, it will be easier ^_-

Greets, Noxx
__________________

iPad Mini, iPad 4, iPad 2, iPhone 3G,4,5, iMac 24", Mac Mini Last gen, Macbook Pro Retina with Dell U2711
jnoxx is offline   0 Reply With Quote
Old Nov 20, 2012, 04:46 PM   #3
fstigre
Thread Starter
macrumors regular
 
Join Date: Aug 2008
First of all thank you for your reply.

I know this is something really simple for someone with experience, but as I said this is only to practice not a real application.

Thanks a lot for the good suggestions, that is definitely opening my mind more. So far at looks like a UITableview is what I will need as well as an custom object.

This is exactly the type of information I'm looking for.

Thanks a lot
__________________
MacBook (not the pro version) 2.4 GHz - 4 GB RAM - 160 GB HD - Snow Leopard - iphone First Generation
- Mac mini - 1.6GHz First Generation with Leopard
fstigre is offline   0 Reply With Quote
Old Nov 20, 2012, 07:41 PM   #4
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Quote:
Originally Posted by fstigre View Post
This application is to practice what I have been reading about Objective-C.
What have you been reading (source details, please) that you are attempting to practice? Just curious.
__________________
dejo is offline   0 Reply With Quote
Old Nov 20, 2012, 10:01 PM   #5
fstigre
Thread Starter
macrumors regular
 
Join Date: Aug 2008
I have been reading the book called Programming iOS 5 and Programming in Objective-C and I feel that if I don't put in practice what I read creating some functinal programs I will never have a good understanding and I wont force myself to work on projects that require challanging tasks, in this case I feel that if I get this done it will open me doors in the programming world.

Thanks
fstigre is offline   0 Reply With Quote
Old Nov 20, 2012, 11:51 PM   #6
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Are you doing the exercises at the ends of the chapters?
__________________
dejo is offline   0 Reply With Quote
Old Nov 21, 2012, 06:19 AM   #7
fstigre
Thread Starter
macrumors regular
 
Join Date: Aug 2008
Some of them, but the only one that has exercises is Programming in Objective-C and I want to start doing more with real iOS programming.

I'm actually waiting for the Sams Teach Yourself iOS 5 Application Development in 24 Hours (4rd Edition), I know this one has exercises as it teaches the Foundation.

You don't think this is a good approach to learn? If not, what do you recommend?

Thanks a lot for your help.
__________________
MacBook (not the pro version) 2.4 GHz - 4 GB RAM - 160 GB HD - Snow Leopard - iphone First Generation
- Mac mini - 1.6GHz First Generation with Leopard
fstigre is offline   0 Reply With Quote
Old Nov 21, 2012, 10:02 AM   #8
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Quote:
Originally Posted by fstigre View Post
I'm actually waiting for the Sams Teach Yourself iOS 5 Application Development in 24 Hours (4rd Edition)...
I would cancel that order immediately, if possible. I have never heard any good things about that book. I would recommend Apress' Beginning iOS 5 Development instead. It doesn't have exercises at the end of each chapter but the quality of this book series overall is much higher than the SAMS one, I believe.

Quote:
You don't think this is a good approach to learn? If not, what do you recommend?
Oh, I think your approach is good. It might just be a bit ambitious at this point of your learning curve to attempt editable tables. Get comfortable with the fundamentals of iOS development first. Then you can begin to try some self-initiated challenges.
__________________
dejo is offline   0 Reply With Quote
Old Nov 21, 2012, 12:49 PM   #9
fstigre
Thread Starter
macrumors regular
 
Join Date: Aug 2008
Quote:
Originally Posted by dejo View Post
I would cancel that order immediately, if possible. I have never heard any good things about that book. I would recommend Apress' Beginning iOS 5 Development instead. It doesn't have exercises at the end of each chapter but the quality of this book series overall is much higher than the SAMS one, I believe.
That’s good to know but why is this book rated higher at Amazon than the one you are suggesting?

Quote:
Oh, I think your approach is good. It might just be a bit ambitious at this point of your learning curve to attempt editable tables. Get comfortable with the fundamentals of iOS development first. Then you can begin to try some self-initiated challenges.
So, editable tables can be considered a more advanced topic for a beginners?

Thank you very much for your suggestions, I really appreciate your input, it helps me a lot.
__________________
MacBook (not the pro version) 2.4 GHz - 4 GB RAM - 160 GB HD - Snow Leopard - iphone First Generation
- Mac mini - 1.6GHz First Generation with Leopard

Last edited by fstigre; Nov 21, 2012 at 02:06 PM.
fstigre is offline   0 Reply With Quote
Old Nov 21, 2012, 05:18 PM   #10
PhoneyDeveloper
macrumors 68030
 
PhoneyDeveloper's Avatar
 
Join Date: Sep 2008
The list of items that you show in your sketch is a table view. Deleting rows is a standard part of the table view API.

I recommend that you work your way through the Stanford iOS lectures and do the assignments. It's a college course, free, and many people have used it and recommend it.
PhoneyDeveloper is offline   0 Reply With Quote
Old Nov 21, 2012, 05:59 PM   #11
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Quote:
Originally Posted by fstigre View Post
Thatís good to know but why is this book rated higher at Amazon than the one you are suggesting?
I don't know. Just seems to me that many of those who come to this forum having read the Apress book found it helpful, whereas those who've read the SAMS book often come here with problems.
__________________
dejo is offline   0 Reply With Quote
Old Nov 21, 2012, 06:11 PM   #12
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Quote:
Originally Posted by dejo View Post
I don't know. Just seems to me that many of those who come to this forum having read the Apress book found it helpful, whereas those who've read the SAMS book often come here with problems.
I went through SAM's book on Android in about a week, then returned it because it didn't seem like something I'd ever need again. Then again, I just don't like learning from books. I prefer learning from websites, audio/video, and talking with people...

I highly recommend the Stanford lectures on iTunes U for learning iOS development.
__________________
Don't tell me Macs don't last: 2007 iMac, 2007 Mac Mini, 2008 MacBook Air, all Vintage.
(iMac obsoletion: April 28, 2015, MBA: October 14, 2015, Mac Mini: March 9, 2016)
ArtOfWarfare is offline   0 Reply With Quote
Old Nov 21, 2012, 08:30 PM   #13
fstigre
Thread Starter
macrumors regular
 
Join Date: Aug 2008
Thank you all for your help, I really apreciate your suggestions.

Aren't the Standford courses a little outdated?

Last edited by fstigre; Nov 21, 2012 at 08:54 PM.
fstigre is offline   0 Reply With Quote
Old Nov 22, 2012, 02:46 PM   #14
fstigre
Thread Starter
macrumors regular
 
Join Date: Aug 2008
Quote:
Originally Posted by fstigre View Post
Thank you all for your help, I really apreciate your suggestions.

Aren't the Standford courses a little outdated?
I'm going to answer my own question.

It is not, originally I was looking at the first course from 2009, but it looks like the latest is from 2011 which covers Xcode 4, storyboards and ARC which I believe are the most noticeable changes.

I have watched the first two videos and let me tell you, it is awesome, it makes you feel like your are in class. Very well explained, I have a feeling that I will be learning a lot throughout the course.

Thanks a lot.
__________________
MacBook (not the pro version) 2.4 GHz - 4 GB RAM - 160 GB HD - Snow Leopard - iphone First Generation
- Mac mini - 1.6GHz First Generation with Leopard
fstigre is offline   0 Reply With Quote
Old Nov 24, 2012, 08:52 PM   #15
Duncan C
macrumors 6502a
 
Duncan C's Avatar
 
Join Date: Jan 2008
Location: Northern Virginia
 
Quote:
Originally Posted by ArtOfWarfare View Post
I went through SAM's book on Android in about a week, then returned it because it didn't seem like something I'd ever need again. Then again, I just don't like learning from books. I prefer learning from websites, audio/video, and talking with people...

I highly recommend the Stanford lectures on iTunes U for learning iOS development.
It's funny how everybody's different. I personally do NOT like learning from videos. I find it annoying to have to wade through a presentation for 45 minutes when some parts crawl an could be covered in a lot less time, and other parts skim over critical details and I have to go back and watch them on slo-mo to try to figure out what the presenter is doing.

I much prefer books because I can skim some parts and pore over others until I understand them.

Different strokes for different folks...
__________________
Regards,
Duncan Champney, WareTo.
Check out our latest iOS app, Face Dancer, available for free on the App Store.
Duncan C is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
How to delete MULTIPLE reading list items at the same time patent10021 OS X 0 Apr 9, 2013 02:13 AM
Can you move reading list items to bookmarks? SuperKirby iOS 6 7 Mar 18, 2013 06:14 PM
Can you move reading list items to bookmarks? SuperKirby OS X 10.8 Mountain Lion 0 Mar 18, 2013 04:28 PM
help [remove items from Safari Popular list] bpul2113 iMac 9 Oct 17, 2012 12:23 AM
Deleting unwanted list items. fhill2 Mac Programming 2 Jun 19, 2012 10:55 PM

Forum Jump

All times are GMT -5. The time now is 01:05 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC