1 Replies - 4097 Views - Last Post: 22 July 2012 - 03:51 PM

#1 Medic873  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 78
  • Joined: 16-November 08

First Application Issue

Posted 20 July 2012 - 05:00 PM

Okay I have been doing this for about 3 hours now... Of course it isnt homework and nothing malicious just simple label changer

What I am trying to have happen is Just the label to the right of label sevenday to say "hello"

and so on for the rest I think you might be able to understand better by looking at the code of course if you have any questions please dont hesitate to ask.

Let me start with the ViewControl.M source
//
//  Stock_CorrelationsViewController.m
//  Stock Correlations
//
//  Created by Bishop Morley on 7/20/12.
//  Copyright __MyCompanyName__ 2012. All rights reserved.
//

#import "Stock_CorrelationsViewController.h"

@implementation Stock_CorrelationsViewController
@synthesize Stock1;
@synthesize Stock2;
@synthesize SevenDay;
@synthesize ThirdyDay;
@synthesize SixtyDay;
@synthesize NintyDay;
@synthesize Year;

-(IBAction) CalculateCorrelation: (id) sender{
	NSString *titleOfButton = [sender titleForState:UIControlStateNormal];
	NSString *newLabelText = [[NSString alloc] initWithFormat:@"%@", titleOfButton];
	SevenDay.text = newLabelText;
	ThirdyDay.text = newLabelText;
	SixtyDay.text = newLabelText;
	NintyDay.text = newLabelText;
	Year.text = newLabelText;
	[newLabelText release];
	
	
}

-(IBAction) goAwayKeyborad: (id) sender{
	[sender resignFirstResponder];
}


- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	self.SevenDay=nil;
	self.ThirdyDay=nil;
	self.SixtyDay=nil;
	self.NintyDay=nil;
	self.Year=nil;
}


- (void)dealloc {
	[Stock1 release];
	[Stock2 release];
	[SevenDay release];
	[ThirdyDay release];
	[SixtyDay release];
	[NintyDay release];
	[Year release];
    [super dealloc];
}

@end




Now ViewController.h



#import <UIKit/UIKit.h>

@interface Stock_CorrelationsViewController : UIViewController {

	UITextField *Stock1;
	UITextField *Stock2;
	UILabel *SevenDay;
	UILabel *ThirdyDay;
	UILabel *SixtyDay;
	UILabel *NintyDay;
	UILabel *Year;

}

@property(retain, nonatomic) IBOutlet UITextField *Stock1;
@property(retain, nonatomic) IBOutlet UITextField *Stock2;
@property(retain, nonatomic) IBOutlet UILabel *SevenDay;
@property(retain, nonatomic) IBOutlet UILabel *ThirdyDay;
@property(retain, nonatomic) IBOutlet UILabel *SixtyDay;
@property(retain, nonatomic) IBOutlet UILabel *NintyDay;
@property(retain, nonatomic) IBOutlet UILabel *Year;

-(IBAction) goAwayKeyborad: (id) sender;
-(IBAction) CalculateCorrelation: (id) sender;
@end




I dont know why it wont even run in the emulater it just crashes on launch but if I run in console debug mode it says sucessful

I dont know please help thank you and please take in to consideration I am new to iphone sdk and thus a newb

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: First Application Issue

#2 Medic873  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 78
  • Joined: 16-November 08

Re: First Application Issue

Posted 22 July 2012 - 03:51 PM

fixed it myself there was just a small issue in the .xib file thank you
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1