Question

I am using UISegmentedControl (with only one segment) as a button. But problem with this is one cannot change font size in UISegmentedControl (possible in iOS-5+ but I am targeting lower versions devices). Is it possible to extract image of UISegmentedControl from app so that I can use custom UIButton with this image as background?

Any help will be appreciated.

Was it helpful?

Solution

try UIKit-Artwork-Extractor (look for it on github.com)

OTHER TIPS

for (UIImageView*imgView in segmentControl.subviews) {
    UIGraphicsBeginImageContext(imgView.frame.size);
    CGContextRef context = UIGraphicsGetCurrentContext();
    [segmentControl.layer renderInContext:context];
    UIImage *yourImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext(); 
}

and import QuartzCore.framework

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top