Frage

generasacodicetagpre.

gibt beim Kompilieren keinen Fehler an.Läuft ohne Warnung, aber es funktioniert nicht.

Ich sehe nicht, was das Problem ist.

...

edit: OMG, sollte auch delegierte Methode genannt werden müssen: generasacodicetagpre.

War es hilfreich?

Lösung

I recommend you this method to share the app delegate: https://coderwall.com/p/z4h4uw?i=2&p=1&q=&t%5B%5D=%21%21mine&t%5B%5D=%21%21bookmarks

Andere Tipps

and instantiated an appDelegate …

No, you haven't instantiated anything, you've just declared a variable that can point to your app delegate. But you haven't assigned anything to that variable yet.

And instantiating another object would be wrong here since the app delegate instance already exists. You just have to reference the existing app delegate and assign it to your variable:

appD = (myAppDelegate *)[[UIApplication sharedApplication] delegate];

(Btw, you should follow the naming conventions. Class names should always begin with a capital letter.)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top