开发者

Objective C: How can you pass integer variables between classes?

开发者 https://www.devze.com 2023-02-22 08:37 出处:网络
So lets say I made a variable in o开发者_如何转开发ne class called \'number\' and gave it a value of 3.

So lets say I made a variable in o开发者_如何转开发ne class called 'number' and gave it a value of 3.

and I made a variable in another class called 'number2'

what functions could I use to pass the value of 'number' to 'number2' in that other class?

Thanks.


To get started with Objective-C, including learning how to pass values as method arguments, have a look at Apple's Learning Objective-C: A Primer, Object-Oriented Programming with Objective-C, and Cocoa Fundamentals Guide.


Look up accessor methods on google.

0

精彩评论

暂无评论...
验证码 换一张
取 消