美文网首页
UISegmentedControl添加图片不显示的问题

UISegmentedControl添加图片不显示的问题

作者: pinksnow | 来源:发表于2016-07-25 10:28 被阅读68次

UIImage*picture1 = [[UIImageimageNamed:@"fuwu-1"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

UIImage*picture2 = [[UIImageimageNamed:@"pingjia-1"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

NSArray*images =@[picture1,picture2,picture3];

UISegmentedControl*segment= [[UISegmentedControlalloc]initWithItems:images];

这样就可以正常显示图片啦

UIImage*picture3 = [[UIImageimageNamed:@"wenti-1"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

相关文章

网友评论

      本文标题:UISegmentedControl添加图片不显示的问题

      本文链接:https://www.haomeiwen.com/subject/baugjttx.html