Skip to content

Instantly share code, notes, and snippets.

Created December 15, 2012 03:34
Show Gist options
  • Save anonymous/4291147 to your computer and use it in GitHub Desktop.
Save anonymous/4291147 to your computer and use it in GitHub Desktop.
Some beginning iPhone code that doesn't work.
@interface rjhccViewController : UIViewController{
int myInt;
IBOutlet UIImageView *testcontainer;
IBOutlet UILabel *heightS;
IBOutlet UILabel *widthS;
}
-(IBAction) img1;
-(IBAction) img2;
@end
-(IBAction)img1{
UIImage *img = [UIImage imageNamed:@"p.jpeg"];
[testcontainer setImage:img];
[testcontainer setFrame:CGRectMake(0,0,50,50)];
NSString *imgheight = [NSString stringWithFormat:@"%i",[[NSNumber numberWithFloat:img.size.height] intValue]];
heightS.text = imgheight;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment