Todo proyecto con m谩s de 3 a帽os (probablemente hasta de 2) de desarrollo les puedo asegurar que todav铆a tiene algo de Objective-C en sus entra帽as. Lo mejor es conocer ambos lenguajes pero darle prioridad a Swift
Hola, Apple
Hablemos de iOS
Conozcamos XCode
驴Necesito un iPhone para ser iOS Developer?
Tu primera app en iOS
隆Hola, Mundo Apple!
Navegaci贸n con UINavigationController
Modales en la navegaci贸n
Utilizando controles en c贸digo
Autolayout vs SwiftUI
Autolayout
Listas con UITableView
Celdas personalizadas para nuestras listas.
Persistencia: UserDefaults
Manejo de dependencias
CocoaPods
Carthage
Servicios Web
Primeros pasos para consumir servicios
Afinando detalles para consumir servicios
Convirtiendo los JSON a modelos
Alamofire
Proyecto: PlatziTweets
Bienvenido a PlatziTweets
Configurando Proyecto
Dise帽ando vistas iniciales
Configuraci贸n de vistas iniciales
Configuraci贸n de registro
Descripci贸n de la API de PlatziTweets
Conexi贸n de la API y Autenticaci贸n
Registro de usuarios
Dise帽o del Tweet
Obteniendo Tweets
Creaci贸n de vista para publicar Tweets
Publicando Tweets
Borrando Tweets
Integraci贸n de la c谩mara
Conexi贸n con Firebase
Configuraci贸n de XCode para correr app
Subir imagen a Firebase
Publicar Tweet con imagen
Tomando Videos para el Tweet
Publicar Tweet con video
Detalles del video
Accediendo al GPS
Implementando mapas con MapsKit
Mostrando todos los estudiantes en el mapa
Retos del proyecto
En producci贸n
Enviar a pruebas con Firebase Distribution
Enviar tu aplicaci贸n a APP Store Connect
Distribuci贸n de tu app con TestFlight
iOS Avanzado
Dark Mode
SwiftUI
Terminando detalles de una vista con SwiftUI
Objective-C
Hola, iOS Developer
Felicidades
Expert Session: 隆nuevo espacio para resolver tus dudas sobre el desarrollo de Apps para iOS!
You don't have access to this class
Keep learning! Join and start boosting your career
Although Swift dominates iOS development in today's landscape, learning Objective-C is still relevant and can be the key to a job as an iOS developer. Despite the fact that Objective-C, a programming language created over 40 years ago, may seem old-fashioned, it is still necessary to understand the structure behind many older apps and have an edge in the job market. Mastering Objective-C will allow you not only to create apps, but also to understand and modify legacy applications that might be composed of both languages.
To start your journey in Objective-C, creating a new project is essential. Here we show you a step-by-step to prepare the ground:
Create a new project:
Project structure in Objective-C:
.h
for the public interface and .m
for the implementation.When creating a new project, you will notice that there are more files than in Swift, due to the separate use of interface and implementation files, which can be overwhelming at first. However, having this clear structure is crucial for understanding how the different parts of the code relate to each other.
Objective-C has some notable differences from Swift in the way interfaces and classes are handled. For starters, it's important to understand how these connections are established in your code:
@interface
and @implementation
to define classes..h
file and defined in the .m
file.One aspect that stands out is the use of the asterisk ( *
) as a memory pointer, necessary for the declaration of variables.
@interface ViewController : UIViewController@property (nonatomic, weak) IBOutlet UITableView *tableView;@end
@implementation ViewController- (void)viewDidLoad { [super super viewDidLoad]; [self setupUI];}
-(void)setupUI { self.tableView.dataSource = self;}@end
Here is an important difference with Swift in terms of interface handling: in Objective-C, you need to manually implement many of the features that in Swift are automatically configured.
Creating a basic user interface with tables in Objective-C is not much different from Swift, once you understand the basics. Here's a quick guide to setting up a table:
Add TableView from Storyboard:
Implement datasource methods:
UITableViewDataSource
in the .h
file..m
to define the number of rows and cell characteristics.-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 10; // Number of cells}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CellID" forIndexPath:indexPath]; cell.textLabel.text = @"I am a cell"; return cell;}
This example highlights the use of Swift-like methods, but with a syntax that reflects the age and unique features of Objective-C.
Learning Objective-C can be challenging due to its different syntax and approaches than Swift, but its benefits include:
The path to mastering Objective-C is both a challenge and an opportunity for personal and professional growth. Although at first you may be scared by its structure and fine details, such as the need to handle pointers and differentiate between interface and implementation files, facing these challenges will help you grow as a developer, better preparing you for the iOS job market.
Contributions 4
Questions 0
Todo proyecto con m谩s de 3 a帽os (probablemente hasta de 2) de desarrollo les puedo asegurar que todav铆a tiene algo de Objective-C en sus entra帽as. Lo mejor es conocer ambos lenguajes pero darle prioridad a Swift
馃槄Me desesper茅 solo con ver el c贸digo
馃
Si es correcto en donde yo laboraba ten铆an aplicaciones aun con objective-c
Want to see more contributions, questions and answers from the community?