GithubHelp home page GithubHelp logo

seanpm2001-all / learn-objective-c Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seanpm2001/learn-objective-c

1.0 2.0 0.0 294 KB

A repository for showcasing my knowledge of the Objective-C programming language, and continuing to learn the language.

Home Page: https://github.com/seanpm2001/Learn-Objective-C/

License: GNU General Public License v3.0

Objective-C 100.00%

learn-objective-c's Introduction


/Objective-C-Logo.png

Learning Objective-C

I hardly know anything about the Objective-C programming language. This document will go over all of my knowledge of the Objective-C programming language.

Hello World in Objective-C

This is an example of a Hello World program in Objective-C, taken from TutorialsPoint this language is complicated, I don't understand it, and I have no way of testing it.

#import <Foundation/Foundation.h>

@interface SampleClass:NSObject
- (void)sampleMethod;
@end

@implementation SampleClass

- (void)sampleMethod {
   NSLog(@"Hello, World! \n");
}

@end

int main() {
   /* my first program in Objective-C */
   SampleClass *sampleClass = [[SampleClass alloc]init];
   [sampleClass sampleMethod];
   return 0;
}

/!\ This example has not been tested yet, and may not work

Comments in Objective-C

Comments in Objective-C are identical to those of comments in C, C++, etc.

// This is a single line comment
/* This is
a multi-li
ne comment
*/

/!\ This example has not been tested yet, and may not work

Other knowledge of the Objective-C programming language

  1. Objective-C is a language by Apple Inc.

  2. Objective-C uses the *.m *.mm and *.h file extensions

  3. Objective-C is a semicolon and curly bracket language

  4. No other knowledge of the Objective-C++ programming language.


learn-objective-c's People

Contributors

seanpm2001 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.