Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-19-2010, 03:52 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 1
Default 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
monk is offline   Reply With Quote
Reply

Bookmarks

Tags
color, uibutton

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Stats
Members: 158,884
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, karlam963
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:16 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0