01-19-2010, 03:52 PM
#1 (permalink )
Registered Member
Join Date: Jan 2010
Posts: 1
HELP! UIButton color/ text color
IM am very new to iphone development and am struggling to make my simple game work. What i want to do is change either the color or text color of UIButton gameButton1. Here is the code i have. Thanks in advance....ATM the program successfully builds and runs.
.m
#import "MainView.h"
@implementation MainView
- (IBAction)back {
[UIView beginAnimations:Nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFl ipFromLeft forView:self cache:YES];
[view2 removeFromSuperview];
[self addSubview:view1];
[UIView commitAnimations];
}
- (IBAction)gameButton1 {
}
- (IBAction)highscores {
[UIView beginAnimations:Nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFl ipFromLeft forView:self cache:YES];
[view1 removeFromSuperview];
[self addSubview:view3];
[UIView commitAnimations];
}
- (IBAction)play {
[UIView beginAnimations:Nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFl ipFromLeft forView:self cache:YES];
[view1 removeFromSuperview];
[self addSubview:view4];
[UIView commitAnimations];
}
- (IBAction)pushBack {
[UIView beginAnimations:Nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFl ipFromRight forView:self cache:YES];
[view3 removeFromSuperview];
[self addSubview:view1];
[UIView commitAnimations];
}
- (IBAction)pushStart {
[UIView beginAnimations:Nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFl ipFromLeft forView:self cache:YES];
[view1 removeFromSuperview];
[self addSubview:view2];
[UIView commitAnimations];
}
@end
.h
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface MainView :UIView{
IBOutlet UIView *view1;
IBOutlet UIView *view2;
IBOutlet UIView *view3;
IBOutlet UIView *view4;
}
- (IBAction)back;
- (IBAction)gameButton1;
- (IBAction)highscores;
- (IBAction)play;
- (IBAction)pushBack;
- (IBAction)pushStart;
@end
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
» Advertisements
» Online Users: 312
22 members and 290 guests
@sandris , ADY , AragornSG , BrianSlick , dacapo , Dani77 , Dattee , dre , glenn_sayers , HDshot , HemiMG , JasonR , karlam963 , nibeck , prchn4christ , Rudy , spiderguy84 , themathminister , tomtom100 , viniciusdamone , vogueestylee , vvenkatachallam
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,884
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, karlam963