
Hi,
How to create UIButton with image?
Thanks

Hi,
Following code is useful:
UIButton *btnNext = [UIButton buttonWithType:UIButtonTypeCustom]; btnNext.frame = CGRectMake(0, 0, 97, 38); [btnNext setTitle:@"Button One" forState:UIControlStateNormal]; [btnNext addTarget:self action:@selector(method:) forControlEvents:UIControlEventTouchUpInside]; UIImage *btnNextImageNormal = [UIImage imageNamed:@"button_next.png"]; [btnNext setImage:btnNextImageNormal forState:UIControlStateNormal]; btnNext.tag=1205; [self.view addSubview:btnNext];
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.