将UIPageControl设置为图片的方法

UIPageControl *pageControl = [[UIPageControl alloc] init];

[pageControl setValue:[UIImage imageNamed:@"image1"] forKeyPath:@"_pageImage"];

[pageControl setValue:[UIImage imageNamed:@"image2"] forKeyPath:@"_currentPageImage"];

[self addSubview:pageControl];

self.pageControl = pageControl;

你可能感兴趣的:(将UIPageControl设置为图片的方法)