Wie hält man ein NSThread sub-thread im iphone

Erstellte ich ein sub-thread mit NSThread im Haupt-thread

NSThread *newThread = [[NSThread alloc] initWithTarget:self selector:@selector(MyThread:) object:timer];

5 sec später habe ich verwendet [newThread Abbrechen] im Haupt-thread zum beenden der sub-thread,aber es hat nicht funktioniert,

Methode MyThread: in newThread noch arbeiten

also,was ist die richtige Antwort, um zu stoppen newThread,THX

eigentlich [newThread isCancelled] JA,aber Selektor MyThread war noch woking

  • timer ist NSTimer Instanz
InformationsquelleAutor None | 2010-07-07
Schreibe einen Kommentar