Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to add a Tasks #7

Closed
4 tasks done
sohilpandya opened this issue Mar 6, 2017 · 9 comments
Closed
4 tasks done

Ability to add a Tasks #7

sohilpandya opened this issue Mar 6, 2017 · 9 comments
Assignees
Milestone

Comments

@sohilpandya
Copy link
Member

sohilpandya commented Mar 6, 2017

As a user I would like to add a new task

Once we have set up the basics in #6 we can move onto providing the users with the ability to add new tasks.

  • Add button from nav bar to redirect user to a view where they can add a new task
  • Once the user adds a new task it will appear in the table view in View a list of existing tasks on the iPhone #6
  • Remove an existing task
  • Saving task to Core data

Potentially need to figure out the best place to store this data. Potentially do some research around how to save to local phone storage.

@iteles
Copy link
Member

iteles commented Mar 6, 2017

FYI @sohilpandya A photo of a paper sketch is extremely useful in this kind of situation too 👍 Good for historical reasons!

@sohilpandya
Copy link
Member Author

img_9135
How I plan to tackle this issue 😄

@sohilpandya
Copy link
Member Author

Added ability to navigate to and from the new AddTaskView Controller, was stuck on how I would go about dismissing the view, managed to find the related method 😄
https://developer.apple.com/reference/uikit/uiviewcontroller/1621505-dismiss

@sohilpandya
Copy link
Member Author

sohilpandya commented Mar 8, 2017

Little update
I've not been able to get the save button to enabled when the text field is filled in.
tried to achieve this by using textFieldDidEndEditing method, but this isn't firing 😢
Google search

Solved the issue by resigning the first responder for the text field

    func textFieldShouldReturn(_ textField: UITextField) -> Bool {
        taskName.resignFirstResponder()
        return true
    }

@sohilpandya
Copy link
Member Author

Halted work for the day, current status:

  • unable to save the data 😢

@sohilpandya
Copy link
Member Author

update

I am putting this task on halt and taking a slight detour, I've had a chance to speak with @nazywamsiepawel about the best way to go about storing the data and he recommends that I look into core data rather than nscoding + nsobject.

Core Data is how most of the data should be stored for the app and takes its grounding from SQL, so eventually you will be able to form relationships in your database.

@nazywamsiepawel
Copy link

nazywamsiepawel commented Mar 9, 2017

@sohilpandya after spending some time with core data and understanding the fundamentals you can use one of the wrappers (like https://github.com/carambalabs/SugarRecord) to make development faster.

@iteles
Copy link
Member

iteles commented Mar 9, 2017

Thank you @nazywamsiepawel !

@sohilpandya
Copy link
Member Author

I've updated the todo list on the top to now include the ability to remove tasks as well as the tasks now being stored in core data.

Time required to build the additional view and flow for adding tasks: 4 Hours
But the time taken to read up on core data and then implement the ability to save/remove tasks from the database took: 1.5 Days.
The total is 2 Days for this task, wildly underestimated if we look at the total of 5 Hours 😞 but did split my time between this task and dwyl/learn-apple-watch-development#28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants