UIButton *button = [[UIButton buttonWithType:UIButtonTypeCustom] initWithFrame:CGRectMake(0, 0, 24, 24)]; [button addTarget:self action:@selector(prevButtonClick:) forControlEvents:UIControlEventTouchUpInside]; [button setBackgroundImage:[UIImage imageNamed:@"IntroArrowLeft.png"] forState:UIControlStateNormal]; [self addSubview:button];
it given the information about how to develop the iphone application and games.......
Thursday, November 11, 2010
Create a UIButton with a custom graphic
Here's a little code snippet if you don't want to use the standard UIButton styles. You can attach an image instead:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment