iOS Doesn't open up in iPhone Simulator

DIGITALiam

macrumors newbie
Original poster
Jun 23, 2010
25
0
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.

MainViewController.h
Code:
#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;


@end

MainViewController.m
Code:
#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];
}

... 
@end
 

DIGITALiam

macrumors newbie
Original poster
Jun 23, 2010
25
0
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.
 

DIGITALiam

macrumors newbie
Original poster
Jun 23, 2010
25
0
Thanks.

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