adambard / adambard/learnxinyminutes-docs

[objective-c/en] Couple of inconsistencies

Aperta
#4,290 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Markdown
Stelle
12.3k
Fork
3.7k
Merge medio
13h 10m
PR unite (30g)
6

Descrizione

I've found a couple of issues in the given code that I can't fix myself due to lack of skill in Objective-C and/or not getting the authors' intention in some particular parts of the code. If anyone gives any hints, I'll be happy to fix this myself.

- [ ] `MyClass` contains a couple of variables both in declaration and implementation:
```objective-c
@interface MyClass : NSObject
{
int count;
@private id data;
NSString *name;
}

@implementation MyClass {
long distance;
NSNumber *height;
}
```
However, since these are not properties, XCode is getting confused when trying to access them:
image

- [ ] The same issue applies to `height` in `@implementation` block:
```objective-c
@implementation MyClass {
long distance;
NSNumber *height;
}
```

XCode is confused and refuses to compile `myClassFromHeight`:
image

- [ ] `MyProtocol`, used for declaring `MyClass`, is never declared

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.