My Budget project creation using Iphone technology
Home page creation using programatical approach
viswaviewcontroller.h
#import <UIKit/UIKit.h>
@interface viswaViewController : UIViewController
{
UILabel *myBudgetLabel,*everyMonthIncomeLabel,
*everyMonthexpenditureLabel,
*addTodayExpenditureLabel,*viewSpendingsLabel,*myWebsiteLabel,*contactusLabel,*termsAndConditionsLabel,*everyMonthIncomeButtonAttachlabel,*everyMonthExpenditureButtonAttachlabel,*addTodayExpenditureButtonAttachlabel,*viewspendingsButtonAttachlabel,*myWebsiteButtonAttachlabel,*termsAndConditionsButtonAttachlabel,*contactUsButtonLabel;
UIButton *everyMonthIncomeButton,*everyMonthExpenditureButton,*addTodayExpenditureButton,*viewspendingsButton,*myWebsiteButton,*contactUsButton,*termsAndConditionsButton;
UIImageView *backgroundImage;
}
@end
viswaviewcontroller.m
#import "viswaViewController.h"
@interface viswaViewController ()
@end
@implementation viswaViewController
- (void)viewDidLoad
{
[super viewDidLoad];
backgroundImage=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0,320,548)];
[backgroundImage setImage:[UIImage imageNamed:@"images3.jpg"]];
[self.view addSubview:backgroundImage];
myBudgetLabel=[[UILabel alloc] initWithFrame:CGRectMake(50,10,200,30)];
[myBudgetLabel setText:@"MY Budget"];
[myBudgetLabel setBackgroundColor:[UIColor blackColor]];
[myBudgetLabel setTextAlignment:NSTextAlignmentCenter];
[myBudgetLabel setFont:[UIFont systemFontOfSize:20]];
[myBudgetLabel setTextColor:[UIColor greenColor]];
[myBudgetLabel setBackgroundColor:[UIColor clearColor]];
[self.view addSubview:myBudgetLabel];
everyMonthIncomeButton=[UIButton buttonWithType:UIButtonTypeRoundedRect];
[everyMonthIncomeButton setFrame:CGRectMake(20,50,80,50)];
// [everyMonthIncomeButton setTitle:@"Add" forState:UIControlStateNormal];
[self.view addSubview:everyMonthIncomeButton];
everyMonthIncomeButtonAttachlabel=[[UILabel alloc] initWithFrame:CGRectMake(10,10,50,30)];
[everyMonthIncomeButtonAttachlabel setTextAlignment:NSTextAlignmentCenter];
[everyMonthIncomeButtonAttachlabel setText:@"+"];
[everyMonthIncomeButtonAttachlabel setFont:[UIFont systemFontOfSize:30]];
[everyMonthIncomeButton addSubview:everyMonthIncomeButtonAttachlabel];
everyMonthExpenditureButton=[UIButton buttonWithType:UIButtonTypeRoundedRect];
[everyMonthExpenditureButton setFrame:CGRectMake(110,50,80,50)];
[self.view addSubview:everyMonthExpenditureButton];
everyMonthExpenditureButtonAttachlabel=[[UILabel alloc] initWithFrame:CGRectMake(10,10,50,30)];
[everyMonthExpenditureButtonAttachlabel setText:@"+"];
[everyMonthExpenditureButtonAttachlabel setTextAlignment:NSTextAlignmentCenter];
[everyMonthExpenditureButtonAttachlabel setFont:[UIFont systemFontOfSize:30]];
[everyMonthExpenditureButton addSubview:everyMonthExpenditureButtonAttachlabel];
addTodayExpenditureButton=[UIButton buttonWithType:UIButtonTypeRoundedRect];
[addTodayExpenditureButton setFrame:CGRectMake(200,50,80,50)];
[self.view addSubview:addTodayExpenditureButton];
addTodayExpenditureButtonAttachlabel=[[UILabel alloc] initWithFrame:CGRectMake(10,10,50,30)];
[addTodayExpenditureButtonAttachlabel setText:@"+"];
[addTodayExpenditureButtonAttachlabel setFont:[UIFont systemFontOfSize:30]];
[addTodayExpenditureButtonAttachlabel setTextAlignment:NSTextAlignmentCenter];
[addTodayExpenditureButton addSubview:addTodayExpenditureButtonAttachlabel];
everyMonthIncomeLabel=[[UILabel alloc] initWithFrame:CGRectMake(20,110,80,50)];
[everyMonthIncomeLabel setText:@"Every Month Income" ];
[everyMonthIncomeLabel setBackgroundColor:[UIColor clearColor]];
[everyMonthIncomeLabel setNumberOfLines:2];
[everyMonthIncomeLabel setTextAlignment:NSTextAlignmentCenter];
[everyMonthIncomeLabel setFont:[UIFont systemFontOfSize:13]];
[everyMonthIncomeLabel setTextColor:[UIColor cyanColor]];
[self.view addSubview:everyMonthIncomeLabel];
everyMonthexpenditureLabel=[[UILabel alloc] initWithFrame:CGRectMake(110,110,80,50)];
[everyMonthexpenditureLabel setText:@"Every Month Expenditure"];
[everyMonthexpenditureLabel setNumberOfLines:2 ];
[everyMonthexpenditureLabel setBackgroundColor:[UIColor clearColor]];
[everyMonthexpenditureLabel setTextColor:[UIColor cyanColor]];
[everyMonthexpenditureLabel setFont:[UIFont systemFontOfSize:13]];
[self.view addSubview:everyMonthexpenditureLabel];
addTodayExpenditureLabel=[[UILabel alloc] initWithFrame:CGRectMake(200,110,80,50)];
[addTodayExpenditureLabel setFont:[UIFont systemFontOfSize:13]];
[addTodayExpenditureLabel setText:@"Add Today Expenditure"];
[addTodayExpenditureLabel setNumberOfLines:2];
[addTodayExpenditureLabel setTextColor:[UIColor cyanColor]];
[addTodayExpenditureLabel setBackgroundColor:[UIColor clearColor]];
[addTodayExpenditureLabel setTextAlignment:NSTextAlignmentCenter];
[self.view addSubview:addTodayExpenditureLabel];
viewspendingsButton=[UIButton buttonWithType:UIButtonTypeRoundedRect];
[viewspendingsButton setFrame:CGRectMake(20,170,80,50)];
[self.view addSubview:viewspendingsButton];
viewspendingsButtonAttachlabel=[[UILabel alloc] initWithFrame:CGRectMake(10,10,50,30)];
[viewspendingsButtonAttachlabel setText:@"+"];
[viewspendingsButtonAttachlabel setTextAlignment:NSTextAlignmentCenter];
[viewspendingsButtonAttachlabel setFont:[UIFont systemFontOfSize:30]];
[viewspendingsButton addSubview:viewspendingsButtonAttachlabel];
myWebsiteButton=[UIButton buttonWithType:UIButtonTypeRoundedRect];
[myWebsiteButton setFrame:CGRectMake(110,170,80,50)];
[self.view addSubview:myWebsiteButton];
myWebsiteButtonAttachlabel=[[UILabel alloc] initWithFrame:CGRectMake(10,10,50,30)];
[myWebsiteButtonAttachlabel setText:@"+"];
[myWebsiteButtonAttachlabel setFont:[UIFont systemFontOfSize:30]];
[myWebsiteButtonAttachlabel setTextAlignment:NSTextAlignmentCenter];
[myWebsiteButton addSubview:myWebsiteButtonAttachlabel];
contactUsButton=[UIButton buttonWithType:UIButtonTypeRoundedRect];
[contactUsButton setFrame:CGRectMake(200,170,80,50)];
[self.view addSubview:contactUsButton];
contactUsButtonLabel=[[UILabel alloc] initWithFrame:CGRectMake(10,10,50,30)];
[contactUsButtonLabel setText:@"+"];
[contactUsButtonLabel setFont:[UIFont systemFontOfSize:30]];
[contactUsButtonLabel setTextAlignment:NSTextAlignmentCenter];
[contactUsButton addSubview:contactUsButtonLabel];
viewSpendingsLabel=[[UILabel alloc] initWithFrame:CGRectMake(20,230,80,50)];
[viewSpendingsLabel setText:@"View Spendings"];
[viewSpendingsLabel setFont:[UIFont systemFontOfSize:13]];
[viewSpendingsLabel setTextColor:[UIColor cyanColor]];
[viewSpendingsLabel setBackgroundColor:[UIColor clearColor]];
[viewSpendingsLabel setTextAlignment:NSTextAlignmentCenter];
[viewSpendingsLabel setNumberOfLines:2];
[self.view addSubview:viewSpendingsLabel];
myWebsiteLabel=[[UILabel alloc] initWithFrame:CGRectMake(110,230,80,50)];
[myWebsiteLabel setText:@"My Website"];
[myWebsiteLabel setFont:[UIFont systemFontOfSize:13]];
[myWebsiteLabel setTextAlignment:NSTextAlignmentCenter];
[myWebsiteLabel setTextColor:[UIColor cyanColor]];
[myWebsiteLabel setBackgroundColor:[UIColor clearColor]];
[myWebsiteLabel setNumberOfLines:2];
[self.view addSubview:myWebsiteLabel];
contactusLabel=[[UILabel alloc]initWithFrame:CGRectMake(200,230,80,50)];
[contactusLabel setTextColor:[UIColor cyanColor]];
[contactusLabel setText:@"Contact Us"];
[contactusLabel setTextAlignment:NSTextAlignmentCenter];
[contactusLabel setBackgroundColor:[UIColor clearColor]];
[contactusLabel setFont: [UIFont systemFontOfSize:13]];
[self.view addSubview:contactusLabel];
termsAndConditionsButton=[UIButton buttonWithType:UIButtonTypeRoundedRect];
[termsAndConditionsButton setFrame:CGRectMake(20,290,80,50)];
[self.view addSubview:termsAndConditionsButton];
termsAndConditionsButtonAttachlabel=[[UILabel alloc] initWithFrame:CGRectMake(10,10,50,30)];
[termsAndConditionsButtonAttachlabel setText:@"+"];
[termsAndConditionsButtonAttachlabel setFont:[UIFont systemFontOfSize:30]];
[termsAndConditionsButtonAttachlabel setTextAlignment:NSTextAlignmentCenter];
[termsAndConditionsButton addSubview:termsAndConditionsButtonAttachlabel];
termsAndConditionsLabel=[[UILabel alloc] initWithFrame:CGRectMake(20,350,80,50)];
[termsAndConditionsLabel setText:@"Terms and Conditions"];
[termsAndConditionsLabel setTextColor:[UIColor cyanColor]];
[termsAndConditionsLabel setTextAlignment:NSTextAlignmentCenter];
[termsAndConditionsLabel setFont:[UIFont systemFontOfSize:13]];
[termsAndConditionsLabel setBackgroundColor:[UIColor clearColor]];
[termsAndConditionsLabel setNumberOfLines:2];
[self.view addSubview:termsAndConditionsLabel];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
No comments:
Post a Comment