dev:objective-c

Differences

This shows you the differences between two versions of the page.


Previous revision
dev:objective-c [2023/05/01 17:26] (current) – [Hello World] Henrik Yllemo
Line 1: Line 1:
 +<button type="primary" size="xs" icon="glyphicon glyphicon-bookmark">[[programming_lagugages| Programming Language]]</button> 
 +<nav type="tabs" justified="false">
 +  * [[:dev:xcode]]]]
 +  * [[:dev:swift]]
 +  * [[:dev:swiftui]]
 +  * [[:dev:objective-c]]
 +  * [[:kb:ios]]
 +  * [[:kb:macos]]
 +</nav>
 +====== Objective-C ======
  
 +<data programminglanguage>
 +Full Name: Objective-C
 +Short Name: Objective-C
 +Description: Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language
 +Company: Apple
 +Web: No
 +Mobile: Yes
 +Enterprise: Yes
 +Embedded : No
 +</data>
 +
 +<accordion>
 +<panel title='What is Objective-C?'>
 +Objective-C is a programming language that was developed in the 1980s and is commonly used for developing software for macOS and iOS. It is a strict superset of C, meaning that any valid C code is also valid Objective-C code.
 +</panel><panel title='What are some features of Objective-C?'>
 +Objective-C includes features such as dynamic binding, message passing, and protocols, which allow for flexible and dynamic object-oriented programming. It also includes support for categories, which allow for adding functionality to existing classes, and blocks, which are similar to anonymous functions.
 +</panel><panel title='What is the difference between Objective-C and Swift?'>
 +Objective-C and Swift are two different programming languages that are used for developing software for macOS and iOS. Objective-C is an older language that has been used for many years, while Swift is a newer language that was introduced by Apple in 2014. Swift is designed to be easier to learn and use than Objective-C, and includes features such as type inference and optionals that make it safer and more expressive.
 +</panel><panel title='How is Objective-C used in iOS development?'>
 +Objective-C is commonly used in iOS development to create native apps for iPhones, iPads, and other iOS devices. It is used to write the code that controls the user interface, interacts with the device's hardware, and communicates with external APIs and databases.
 +</panel><panel title='What are some popular Objective-C frameworks and libraries?'>
 +Some popular Objective-C frameworks and libraries for iOS development include UIKit, Core Data, and Cocoa Touch.
 +</panel><panel title='Can Objective-C code be used in Swift projects?'>
 +Yes, Objective-C code can be used in Swift projects using bridging headers. This allows for interoperability between Objective-C and Swift code, which is useful for developers who are migrating from Objective-C to Swift or who are working on projects that include both languages.
 +</panel><panel title='Is Objective-C still relevant today?'>
 +Objective-C is still relevant today, particularly for developers who are maintaining legacy code or who are working on macOS and iOS projects that were developed using Objective-C. However, Swift is increasingly becoming the preferred language for new iOS and macOS projects, as it is easier to learn and use than Objective-C and includes many modern language features.
 +</panel></accordion>
 +
 +
 +{{wp>Objective-C}}
 +<callout type="" title="GitHub Topics" icon="fa fa-github">
 +  * https://github.com/topics/objective-c
 +
 +Objective-C builds on the foundations of ANSI C. Compared to other object-oriented languages based on C, Objective-C is very dynamic. Dynamism enables the construction of sophisticated development tools. Since Objective-C incorporates C, one gets all the benefits of C when working within Objective-C.
 +</callout> 
 +
 +<callout type="" title="Free Programming Books" icon="fa fa-book">
 +  * [[https://github.com/google/styleguide/blob/gh-pages/objcguide.md|Google's Objective-C Style Guide]]
 +  * [[https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/OOP_ObjC/Introduction/Introduction.html#//apple_ref/doc/uid/TP40005149|Object-Oriented Programming with Objective-C]]
 +  * [[https://goalkicker.com/ObjectiveCBook/|Objective-C Notes for Professionals]]
 +  * [[https://www.syncfusion.com/resources/techportal/ebooks/objective-c|Objective-C Succinctly, Syncfusion]]
 +  * [[https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html|Programming With Objective-C]]
 +
 +<WRAP column right><wrap lo>Source: [[https://github.com/EbookFoundation/free-programming-books/blob/main/books/free-programming-books-langs.md|EbookFoundation]]</wrap></WRAP>
 +</callout> 
 +
 +
 +<jumbotron>
 +===== Hello World =====
 +
 +<sxh >
 +#import <stdio.h>
 +
 +int main (int argc, const char *argv[])
 +{
 +    printf ("Hello, world!\n");
 +    return 0;
 +}
 +</sxh>
 +<WRAP column right><wrap lo>Source: [[https://en.wikibooks.org/wiki/Computer_Programming/Hello_world|Wikibooks]]</wrap></WRAP>
 +</jumbotron>
 + 
 +=== ## ToDo ## ===
 +  * FIXME
 +  * Object-Oriented Programming (OOP)
 +  * Classes
 +  * Inheritance
 +  * Polymorphism
 +  * Categories
 +  * Protocols
 +  * Dynamic binding
 +  * Memory management
 +  * ARC (Automatic Reference Counting)
 +  * Properties
 +  * Methods
 +  * Blocks
 +  * Selectors
 +  * Foundation framework
 +  * Cocoa Touch framework
 +  * UIKit framework
 +  * Multithreading
 +  * Debugging
 +  * Xcode IDE
 +  * Interface Builder
 +
 +
 +See also: [[dev:programming_lagugages]]
 +
 +{{tag>programminglanguage dev-apple}}