adambard / adambard/learnxinyminutes-docs

[objective-c/en] Couple of inconsistencies

Ouverte
#4,290 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Markdown
Étoiles
12.3k
Forks
3.7k
Merge moyen
13 h 10 min
PR mergées (30 j)
6

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.