Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 06-11-2009, 06:47 PM   #7 (permalink)
canit210
New Member
 
Join Date: Jun 2009
Posts: 23
Default

Could somebody please help!!?!?!?!?!

I posted in another thread and made the revisions accordingly (see below).

This is really starting to frustrate me. I implemented what they told me but nothing is actually showing up when I run it on the Simulator. Could you please tell me what exactly I need to add (and how) to Interface Builder so it will display the equation. I've tried label but when I Control-Drag from File's Owner to the label to connect the code to the label, nothing happens when I run it. I must be missing something.

Below is my .h file:

Code:
#import <UIKit/UIKit.h>

@interface AddTapViewController : UIViewController {
	NSString		*mathQuestion;
	NSString		*randomA;
	NSString		*randomB;
	IBOutlet		UILabel		*label;
}
@property (nonatomic, retain)	NSString	*mathQuestion;
@property (nonatomic, retain)	NSString	*randomA;
@property (nonatomic, retain)	NSString	*randomB;
@property (nonatomic, retain) UILabel *label;
- (void)randomEquation;

@end
Below is my .m file:


Code:
#import "AddTapViewController.h"

@implementation AddTapViewController
@synthesize mathQuestion;
@synthesize randomA;
@synthesize randomB;
@synthesize label;

- (void)randomEquation
{
    randomA = arc4random() % 6;
    randomB = arc4random() % 6;
    mathQuestion = [NSString stringWithFormat: @"%d + %d", randomA, randomB];
}


// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
    // Release anything that's not essential, such as cached data
}


- (void)dealloc {
    [super dealloc];
	[mathQuestion release];
}

@end
I could really use some help. Thank you to everybody that has helped so far.
canit210 is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 23,840
Threads: 38,605
Posts: 169,509
Top Poster: smasher (2,547)
Welcome to our newest member, raj_123k
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:23 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.