Big company has lots of ObjC code

/## Swift

class Person: NSObject {

var _name: String

init(name: String){

_name = name

}

function setName(name:String){

_name = name

}

}

run in playground

Person.setName(“Dancer”)

/##ObjC

@interface Person : NSObject {

NSString* _name;

}

-(void)setName: (NSString*) name;

-(NSString*) name;

@end

@Implementation Person

-(void)setName: (NSString * )name {

_name = name;

}

-(NSString*) name {

return _name;

}

Actually, run in Main.m

Person* p1 =[Person new];

[p1 setName:@”Dancer”];

NSLog(@”%ld”, [p1 age]);

--

--

--

Major in physical education. Football referee. And high interest in looking the world through the numbers.

Love podcasts or audiobooks? Learn on the go with our new app.

Modern Backend Developer in 2018

Latest Updates on Google Data Analytics (August 2021)

Bold Point AMA #2 — Technical Deep Dive with Denis (Founder, CTO) (Recap)

Deepdive into Pytest parametrization

So-Simple Walk-through

A dialog with some lines of text over an image — WaterMarkDialog

Shooting Laser:

Using Cookies to Create Realistic Lighting in Unity

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mario tsai

Mario tsai

Major in physical education. Football referee. And high interest in looking the world through the numbers.

More from Medium

How to stream on-demand protected video from AWS using signed cookies in Swift

Unicode Considered Harmful

An Example of How to Create A Simple 2D Game in SpriteKit

CoreData with Codable