Objective-C Tutorial - Lesson 22: Part 2: Coding The NSNumber Object

preview_player
Показать описание
Objective-C® for Dummies® by Neal Goldstein, Copyright © 2009 by Wiley Publishing, Inc., is the main source of information for this video.

In Part 2 of this lesson I code the NSNumber object into our program. The NSNumber object is the object that you use to change all your variables to objects.

objective-c tutorial
objective-c tutorials
Objective-C Tutorial
objective c programming tutorial
objective c programming tutorials
Objective C programming Tutorial
Рекомендации по теме
Комментарии
Автор

@nilocski Right now I'm using 3.2.4, but earlier in these lessons I think I was using something like 3.0.

macandcomputerhelp
Автор

Hi, what's the difference between -(void)spendDollars:(NSNumber *)dollars and -(void)spendDollars:(NSNumber)*dollars, ie when we specified dollars as a pointer we wrote *dollars but now the * is inside the parentesis.

MrRickPBush
Автор

another question, why didn't you use as a perimeter, for [europeBudget spendDollars: [numberDollarsInEurope doubleValue]];
instead of just numberDollarsInEurope

and also why didn't you make numberPounds and numberEuros into number objects?

b
Автор

In this lesson, didn't we just defy the rules of encapsulation?

ajkksmarty
Автор

i have a question, for doubles don't you use %d and not %f?

b