How to get NSTimer to loop
问题 I'm trying to learn about NSTimer , using Foundation and printing to the console. Can anybody tell me what I need to do to get the following to work? It compiles with no errors, but does not activate my startTimer method -- nothing prints. My aim is to get one method to call another method to run some statements, and then stop after a set time. #import <Foundation/Foundation.h> @interface MyTime : NSObject { NSTimer *timer; } - (void)startTimer; @end @implementation MyTime - (void)dealloc {