I integrate the iCarousel into my application.It is working fine.But my requirement is to display the two buttons in single view and specific actions for these two buttons.I display the buttons as
- (UIView *) carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(UIView *)view{
UIView *sampleView=[[UIView alloc]initWithFrame:CGRectMake(0, 0, 250, 300)];
sampleView.backgroundColor=[UIColor whiteColor];
UIButton* btntrans=[UIButton buttonWithType:UIButtonTypeCustom];
[btntrans setFrame:CGRectMake(45, 40, 105, 50)];
[btntrans setBackgroundColor:[UIColor clearColor]];
btntrans.titleLabel.font = [UIFont fontWithName:@"Arial-BoldMT" size:15];
[btntrans setTitle:@"" forState:UIControlStateNormal];
[btntrans setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[sampleView addSubview:btntrans];
UIButton* btntrans1=[UIButton buttonWithType:UIButtonTypeCustom];
[btntrans1 setFrame:CGRectMake(45, 90, 105, 50)];
[btntrans1 setBackgroundColor:[UIColor clearColor]];
btntrans1.titleLabel.font = [UIFont fontWithName:@"Arial-BoldMT" size:15];
[btntrans1 setTitle:@"" forState:UIControlStateNormal];
[btntrans1 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[sampleView addSubview:btntrans1];
return sampleView;
}
we can use
-(void)carousel:(iCarousel *)carousel didSelectItemAtIndex:(NSInteger)index
{
NSLog(@"ITEM SELECTED");
}
for whole view selection.but How to set the two specific actions for these two buttons?
Thanks in advance.