Doesn't open up in iPhone Simulator

Discussion in 'iPhone/iPad Programming' started by DIGITALiam, Jul 23, 2010.

  1. macrumors newbie

    Hey I'm writing a basic timer app for learning purposes. When I try to build and run it in the simulator, it crashes right away. I assume it is a memory problem but some guidance would be great. Here is the only code I have written so far.

    #import "FlipsideViewController.h"
    @interface MainViewController : UIViewController <FlipsideViewControllerDelegate> {
    	IBOutlet UILabel *UIsecondTime;
    	IBOutlet UILabel *UIminuteTime;
    	IBOutlet UILabel *UIstate;
    	NSTimer *myTicker;
    	int secondTime;
    	int minuteTime;
    	int state;
    @property(nonatomic,retain) UILabel* UIsecondTime;
    @property(nonatomic,retain) UILabel* UIminuteTime;
    @property(nonatomic,retain) UILabel* UIstate;
    - (IBAction)showInfo:(id)sender;
    - (IBAction)startTimer;
    - (void)stateAndTime;

    #import "MainViewController.h"
    @implementation MainViewController
    @synthesize UIsecondTime;
    @synthesize UIminuteTime;
    @synthesize UIstate;
    int secondTime = 00;
    int minuteTime = 00;
    int state = 0;
    - (IBAction)startTimer{
    	myTicker = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(stateAndTime) userInfo:nil repeats:YES];
    - (void)stateAndTime{
    	secondTime = secondTime - 1;
    	UIsecondTime.text = [NSString stringWithFormat:@"%d", secondTime];
  2. Moderator


    Staff Member

    Do you get any run-time errors? Have you looked at the crash report? Also, keep this in mind: Getting Answers
  3. macrumors newbie

    Sorry I didn't clarify enough.

    There is no errors. I don't exactly know what the crash report is or how to get it and my quick google search didn't come up with anything.
  4. Moderator


    Staff Member

  5. macrumors newbie


    I fixed it. I couldn't figure it out but I copied and pasted the code into a new XCode project.

Share This Page