/r/learnobjectivec
This is a subreddit that contains information that is useful for people who are learning Objective C.
Welcome to /r/learnobjectivec
For all things not related to learning Objective-C, but still related to Objective-C, please post them in /r/objectivec.
Subreddit rules:
Other Objective C subreddits:
Learning Resources
Similar Subreddits
/r/learnobjectivec
Whilst going through and following a tutorial I was taught that using multiple arguments in a methods declaration meant that and had to be used between each argument. Such as:
-(int)add:(int)first and:(int)second
I then began checking out StackOverflow examples, and to my dismay I could not find one single example that used and between arguments. It seemed that everyone just made up something random to use between arguments. Would someone be able to explain to me what the rule is when using multiple arguments in a method declaration?
hey guys as you can probably gather from the title of this thread, I haven't been a happy bunny.
to make a long story short I graduated with a IT related degree almost 4 years ago. I want to give programming another try.
4 years ago my life fell apart and unfortunately was dealing with a major life crisis. I had just finished my last year at university as an IT graduate ( I studied a BSC in games development ). my anxiety, ocd and panic attacks lead me to alcoholism.
my entire life had been put on hold since then ( I wasted 4 years) however I have been currently getting my life back on track these past 5 months and getting out of my fucked up situation
my IT background was piss poor, I sucked at programming ( due to having a poor IT background. I was an electrical engineering student with no programming background )
I could barely program and my course mainly revolved around c++ and C sharp. I was probably the worst programmer in my class and even post graduation I had no fucking idea what I was doing half of the time. I even grew to hate IT. I HAVE NOT PROGRAMMED IN 4 YEARS.
but now I want to give it another shot, with no course work deadlines I feel that I may even enjoy it. I thought about how people are now building apps from their own homes and decided that maybe purchasing an Apple Mac computer I can get into programming using another platform.
I understand iOS programming uses many languages but from what I can gather objective c seems to be the most commonly used amongst IOS developers. that being said I have just received my MacBook Pro in the post and updated my IOS and downloaded Xcode. truth be told I'm kind of alien when it comes to MAC, I have always been PC.
my knowledge with C++ is beyond basic, I understand the concept ( what classes and functions are, storing integers, characters etc..) but I honestly can't write a piece of code to save my life. I haven't programmed in over 4 years and even as a student my knowledge was broken. I had missed out here and there. I want to start fresh and c++ drove me mad..
So here it goes:
What books do I purchase to learn objective C, and the basics of programming from scratch? I want to start again from the beginning...
Should I start from C++ and then move onto objective C? ( id rather start with something new)
Are there any websites, or online courses I could apply for ?
I am willing to enrol for a course somewhere but everywhere/ everything seems to be about money. there are as many online resources asking for payment as there are con artists..
anyway guys and girls sorry if my grammar and spelling is a little over the place I am a little tired from work...
I appreciate the support
Title says it all. I know it's possible to compile Objective-C on Windows, but is it possible to create a GUI as well?
I downloaded this project from gitHub,
https://github.com/iamjohnandrews/Earthquake
and tried to build and run it. However I got,
ld: library not found for -lPods-Earthquake-AFNetworking clang: error: linker command failed with exit code 1 (use -v to see invocation)
What library am I missing here, how do I fix it? I'm new to programming, any help will be really appreciated.
Please, and thank you.
I was dabbling with objective c as a hobby. I'm interested in using mapkit to map earthquake from the data on USGS website. I know that people have done this before, so any known sources of such open projects?
Hi! I'm C++ developer who is migrating into iOS/Objective-C (later will be Swift). I'm following Stanford's lectures about iOS programming and hit the Lecture 10 (Multithreading).
I wrote some code that suppose to be non-blocking (should not block the UI, pushing buttons). I have 3 buttons that segue into other UIVIew that displays image (JPG) from URL. Here is the source code:
I can see on video that the same code work's for the teacher but does not work for me. Is iOS 9 changed something or I messed some queues ? I think I don't need to run my download in background (to run when my app is not on screen) but it needs to be done on different thread than main (UI is on main thread, isn't it ?)
Thanks for any help!
Hi there :))
I'm new in Objective-C. i have studied iOS pre-programming course in training center for two month. after this i have studied objective-C advanced course for 3 months. and i have works as an iOS Developer for one month in a start company.
For now, i am looking for a partner to work with, to study and create simple apps. i you are interested an if you are a beginner iOS developer as me, you can contact me. i'l be glad 
Hi there. Last spring I made an Objective-C app for my bachelor thesis, and since then I haven't worked with anything related to iOS Development (because I started my masters). Now I am preparing for internships interviews, I'd love to go back to mobile development. For the last few days I've been hardly trying to find tutorials, but most of them are either a bit old or too basic. Do you guys have any advice for me, I feel a bit lost and unproductive. I would like to follow a tutorial that actually builds an app.
Objective C isn't dead, and it's not going to die for at least 10-15 years, not the whole "5 years" thing that's been spreading around. What news is there for Objective C? What new things have people been working on regarding Objective C? What new tutorial is out that focuses on Objective C? Objective C needs love too.
I want to write a tool in which a user can create Person-objects, say, and specify certain attributes of the Person (e.g. name, age, photo, etc.). He then can add other persons and specify the relationships between the persons (X knows Y, Y is the father of Z, etc.). example
Can anyone point me into the right direction on how to go about visualising this in Objective-C / Cocoa?
I was thinking of a 'mind map' sort of program, similar to a UML diagram [like boxes with pictures and lines inbetween for the relationships], where the user can drag the persons around and everything moves accordingly. Is there anything in Objective-C or Cocoa that would suit this purpose?
edit: my problem is not so much how to draw these things, I think I could figure that out somehow. But how to make them dynamic / movable and into objects the user can really use and edit etc.
Hey I have a few files that I want Objective C to upload on a server. Can someone explain to me the basics of how I would have to approach this, or point me to some tutorials? Also: What kind of server will I need? Anything special?
Thanks!
Hey everyone!
I really want to get into iOS/OSX development and I would like to learn with Objective-C.
I tend to do better with books than online courses (even though I'm considering that option as well), but everywhere I look for current iOS development the books and online courses feature Swift.
I wouldn't mind learning Swift, but I realize that 1) Objective-C is what Apple's legacy code will likely contain 2) Objective-C is still "industry standard" and 3) on a personal note I have a strong C background and am confident with C++ as well so I figure Objective-C would actually be the easier of the two languages for me to transition into.
So my question is: Are there any good books or online courses out there that teach the current iOS/OSX development with Objective-C or should I use an older book and just find the spark notes/change log/what have you to catch myself up to the current frameworks and practices? Also are there any books that focus on the transition from C/C++ to Objective-C like the old book "Perl for C programmers"?
Thank you!
So the autocomplete window in xcode will often show a return type of a message as a struct. So when I type "timeIntervalSinceDate:" the return type shows "NSTimeInterval." This is ok, but that alone does not tell me the underlying type the struct is aliasing. In the case of NSTimeInterval, it turns out to be a double.
Opening the reference is quiet a pain if I have to do it every single time I don't know the underlying type of the struct. Is there a faster way to reference the return type without having to click through the documentation...? Thanks
Hey all,
I was once learning Objective-C too, and I struggled a lot, so much so that I gave up a few times before sticking to it (it was my first programming language).
I've made a course that teaches from my perspective, of someone who hasn't programmed before and has never done iOS development.
I've released half of the course here, completely free on YouTube: https://www.youtube.com/playlist?list=PLhd0dZ4TO6HiE1AeShjjv-RMnIqpuivpY
If you really want a full-experience, you're free to get the full course here for 25% off, but the free course should do you justice!
I hope it helps, and if you are having trouble with Objective-C, I'd be happy to answer questions in the comments!
I have been "coding" for about three months now. I am absolute beginner.
I have been completing Lynda courses in my spare time.
I have done some of the Swift courses but I get stuck seeing as Lynda's modules' syntax is out of date and I don't necessarily know how to fix this to the new version of Swift.
Does this mean it's a better idea for me to start by learning Objective C instead of Swift?
It seems, from my experiments with Objective C that the language is a lot more established and I make fewer mistakes following along with my lessons.
What would the community recommend? I don't want to waste any time. I have a steep learning curve, I know.
Background: I'm a part-time student learning iOS and getting more comfortable every week. Which major would complement my iOS development? Neither?
I am relatively new to objective c and trying to figure out how to deal with this situation. I have 3 protocols, and 2 of them reference each other. I have tried putting them in other files, but no matter what I do I still have problems. Any help?
as requested from /u/RossistBoss I'm making this post to explain you guys how to format an NSDate object to meet our requierements and/or needs.
so, first things first, we need an NSDate Object
NSDate *date = self.datePicker.date;
remember, this is just an example so lets assume some secondary stuff.
now that we have an NSDate object we are going to declare an NSDateFormatter object, this can be declared within the method you are currently using if this date format is just a one time thing, or you could as well declare it on your header file for all the methods to have acces to it, either way we need to give our formatter a format
NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
[formatter setDateFormat:@"MM/dd/yyyy"];
once we declare the formatter object we need to call the setDateFormat method which recieves an NSString with the format you would like for your date object, this could easily be as well:
[formatter setDateFormat:@"yyyy"]; or
[formatter setDateFormat:@"MM"]; or
[formatter setDateFormat:@"dd"];
once we have decided how we are going to format our NSDate object we need to actually pass it to the date object we want to format
NSString *myDate = [formatter stringFromDate:date];
now if we NSLog the string we just created we are going to have something like this:
10/12/2014
- (NSDate *)removeTimeFromDate:(NSDate *)date {
unsigned unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit;
NSDateComponents *dateComponents = [[NSCalendar currentCalendar] components:unitFlags fromDate:[NSDate date]];
return dateComponents.date;
}