Last active 4 years ago
Test it with println() function to see what is the text.
var myText = "This is a relatively long sentence but it could be longer if I keep typing..."
This will print the text from your variable into the console (of course, my example is using hard coded string, where you are probably referring to a ... for example the content from a text field that you have in a story board view. Either way, its the same. Just printl() it.
I hope I understood u correctly
Sort of sad first introduction post, but I thought I should share. I guess I want to hear more objective opinions than my own thoughts.
I've been trying to learn Swift in my spare time (I have a full-time job, not in Dev field, in SEO field for years now, but that doesn't matter).
I'm female in mid 20s, never really knew a programming language (just for reference, I failed to learn php ... 4 times, or I should probably say gave up learning it).
I've never had a strong logic or mathematical side, so learning to code is really challenging to me. I know most of you have some development experience, but not me, unless u count html (I don't really count html/css).
So, I've started learning Swift several months after the language came out (back in sept, 2014), over 9 months later I feel like I still don't know how to do anything. Every single app idea I have and have actually started working on, I hit the wall from the very beginning, where I have to break it down into smaller pieces to handle it, and I gave up on the app. Like, for example, last app idea - simple app (I thought I should start off by writing a simple app, just practice to write code and handle issues), that app uses API from a website and it should populate a table view cells.
Hit the wall with with the very start of this app as well. I know nothing about APIs, I have to learn as I code, but when you have NO idea about something, how do you write code related to it?! Then, the NS classes stuff, like OMG, I don't get those and what they do (the documentation is made for developers, not "wannaBeDeveloper" people as it's really technical and the language is really technical), that makes it even more frustrating and harder for beginners.
The thing is, I don't want to give up and I WONT give up, I'm SICK of giving up on learning to code, but it makes me feel so stupid. Like, there are thousands if not millions of developers out there and their are not smarter than me, WHY I can't get it?!
Its just SO overwhelming to learn it, screw the language itself, but the whole hierarchy of classes, the thousands sub classes and methods and everything else ... I mean, how you go from 0 experience in coding to "ahhhhh! I get it now!" sort of moment... I understand the language basics, classes, sub classes, objects, properties, whatever, the language isn't that difficult, but the rest of it is ... all libraries and classes in there ... I know we're not supposed to know all of them, but I don't even know what to look for to solve a problem that I have in my app. Meaning, how do you look for something that you have no clear idea what it's called (the technical term)?
I'm not trying to be whining about the language (although it sort of seems like it), I'm just trying to look for some help on how to proceed in order to get to the "clicking" moment when you actually understand it. Also, additional challenge - I'm not an english native speaker, I'm from a small country and there isn't a single book translated about Swift (when they translate something, it will be outdated again of course).
Sorry about the long post, it's just hard time for me, I'm a person who has huge ambition to grow my own skill set by myself and achieve more, it's just hard when you have no experience and you're overwhelmed by all knowledge out there (related to app development).
Any thoughts or advices how to ease this pain and just point me to the right direction is very much welcome!