We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to set image instead of label,i tried this but not working.
(UIView *)viewPager:(ViewPagerController *)viewPager viewForTabAtIndex:(NSUInteger)index { // UILabel *label = [UILabel new]; // label.backgroundColor = [UIColor clearColor]; // label.font = [UIFont systemFontOfSize:12.0]; // label.text = [NSString stringWithFormat:@"karthi #%lu", (unsigned long)index]; // label.textAlignment = NSTextAlignmentCenter; // label.textColor = [UIColor blackColor]; // [label sizeToFit]; UIImageView *img=[UIImageView new]; img.frame=CGRectMake(0, 0, 22, 22); [img sizeToFit]; img.image=[UIImage imageNamed:[self.images objectAtIndex:index]]; [self.titlesLabels insertObject:img atIndex:index];
return img; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
how to set image instead of label,i tried this but not working.
(UIView *)viewPager:(ViewPagerController *)viewPager viewForTabAtIndex:(NSUInteger)index
{
// UILabel *label = [UILabel new];
// label.backgroundColor = [UIColor clearColor];
// label.font = [UIFont systemFontOfSize:12.0];
// label.text = [NSString stringWithFormat:@"karthi #%lu", (unsigned long)index];
// label.textAlignment = NSTextAlignmentCenter;
// label.textColor = [UIColor blackColor];
// [label sizeToFit];
UIImageView *img=[UIImageView new];
img.frame=CGRectMake(0, 0, 22, 22);
[img sizeToFit];
img.image=[UIImage imageNamed:[self.images objectAtIndex:index]];
[self.titlesLabels insertObject:img atIndex:index];
return img;
}
The text was updated successfully, but these errors were encountered: