Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <UIKit/UIKit.h>
- #import <Foundation/Foundation.h>
- @interface UIImageText : UIView {
- IBOutlet UIImageView *image;
- UIImage *curImageLoaded;
- IBOutlet UILabel *labelText;
- IBOutlet CGPoint centera;
- }
- - (IBAction)loadView:(CGFloat)alpha withImage:(UIImage *)loadImage withColor:(UIColor *)color withText:(NSString *)text;
- - (IBAction)setAlpha:(CGFloat)alpha;
- - (UIImage *)imagea;
- - (IBAction)setColor:(UIColor *)color;
- - (IBAction)setImagea:(UIImage *)loadImage;
- - (IBAction)setText:(NSString *)text;
- - (IBAction)setCentera:(CGPoint)centerSet;
- - (CGPoint)centera;
- - (NSString *)text;
- @property (nonatomic, retain) IBOutlet UIImageView *image;
- @property (nonatomic, retain) IBOutlet UILabel *labelText;
- @end
- #import "UIImageText.h"
- @implementation UIImageText
- @synthesize image, labelText;
- - (IBAction)loadView:(CGFloat)alpha withImage:(UIImage *)loadImage withColor:(UIColor *)color withText:(NSString *)text {
- [self setAlpha:alpha];
- [self setColor:color];
- [self setImagea:loadImage];
- [self setText:text];
- [self addSubview:image];
- [self addSubview:text];
- }
- -(NSString *)text
- {
- return labelText.text;
- }
- -(CGPoint)centera
- {
- return [self center];
- }
- - (IBAction)setCentera:(CGPoint)centerSet;
- {
- self.center = centerSet;
- }
- -(UIImage *)imagea
- {
- return curImageLoaded;
- }
- - (IBAction)setAlpha:(CGFloat)alpha {
- [image setAlpha:alpha];
- }
- - (IBAction)setColor:(UIColor *)color {
- [image setBackgroundColor:color];
- }
- - (IBAction)setImagea:(UIImage *)loadImage {
- NSLog(@"setting image");
- [self.image setImage:loadImage];
- curImageLoaded=loadImage;
- //[image beginAnimations:nil context:NULL];
- //[image setAnimationDuration:2];
- //[image setAlpha:1];
- //[image commitAnimations];
- }
- - (IBAction)setText:(NSString *)text {
- [labelText setText:text];
- }
- @end
Add Comment
Please, Sign In to add comment