0
我在xcode圖像資產中添加了PDF矢量文件。矢量文件具有顏色和設計。但是,當它在模擬器上生成時,形狀會保留,但顏色和設計全部消失,取而代之的是平坦的顏色。iOS應用中生成的圖像與原始矢量圖像看起來不同
// code to add the button
- (void) addReplyButton:(STRContent *)content {
UIButton *replyBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
replyBtn.frame = CGRectMake(0, 0, 0, 0);
[[replyBtn imageView] setContentMode: UIViewContentModeScaleAspectFit];
[replyBtn setImage:[UIImage imageNamed:@"reply_button"] forState:UIControlStateNormal];
[self.photoView addSubview:replyBtn];
}
原始圖像
輸出
每次都會發生嗎?或有時顯示正確的圖像? – vichevstefan