Simple 'Notes' Application for Practice
I wanted to practice using Core Data, so I decided to create a NotePad app. My biggest lesson was that iOS 'developers' are not as good at his job as android developers. OR there are more android developers than iOS developers. OR android developers are more helpful. The main gist is that I got lost very often because silly advices. The internet is full of incompetent people who are eager to answers your questions... without knowledge.
One of my problem was that in UITextField I couldn't place the text on the top left corner. I searched for the answer and I got a whole bunch of code snippets which were extremely complicated. I couldn't believe that it had such a difficult solution. In addition I couldn't break lines.
I was struggling two hours with this while a kind man at the very bottom of a Stackoverflow question replied that there was no way to break lines, instead he advised to use UITextView. Wow... is it not the same?! Ok, two problems are solved.
My other problem was that how can I go back to the first viewController. Nothing left than create a segue and direct the EditViewController after saving content. Yeah, but... I've got a back button, and if I clicked it, I went through the whole circle again. Searching for a half an hour, I got the solution. The easiest way to do it:
_ = navigationController?.popToRootViewController(animated: true)
If you don't know the keywords, you are in trouble. In this case the keyword was 'rootViewController'.
Now my app works quite well, and I'm proud of it. You can check it on Github


Megjegyzések
Megjegyzés küldése