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

New Topic/Question
Reply



MultiQuote



|