Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ branches:
- develop
- master
- /^release/\d+\.\d+\.\d+$/
- /^hotfix/\d+\.\d+\.\d+$/
stages:
- name: lint
if: NOT branch =~ ^release/\d+\.\d+\.\d+$
- name: test
if: type != push OR branch =~ ^release/\d+\.\d+\.\d+$
if: type != push OR branch =~ ^release/\d+\.\d+\.\d+$ OR ^hotfix/\d+\.\d+\.\d+$
- name: deploy
if: branch =~ ^release/\d+\.\d+\.\d+$
if: branch =~ ^release/\d+\.\d+\.\d+$ OR ^hotfix/\d+\.\d+\.\d+$
jobs:
include:

Expand Down
2 changes: 1 addition & 1 deletion Example/Tests/Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SwfFontIconSpec: QuickSpec {
let directionProvider = DirectionProviderMock()
directionProvider.it.stub().call(directionProvider.isRtl()).andReturn(true)
let icon:UIImage = .icon(FontIcon(name: "icon").localized(), directionProvider: directionProvider)
expect(icon.isEqual(UIImage())) == true
expect(icon.isEqual(UIImage().withRenderingMode(.alwaysTemplate).imageFlippedForRightToLeftLayoutDirection())) == true
}
it("gets new localized and the layout is not rtl empty UIImage") {
SwfIcon.instance.loadAllSync()
Expand Down
2 changes: 1 addition & 1 deletion SwiftyFontIcon.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'SwiftyFontIcon'
s.version = '0.1.0'
s.version = '0.1.1'
s.summary = 'Use font icons in a readable and easy way.'

# This description is used to generate tags and improve search results.
Expand Down
6 changes: 1 addition & 5 deletions SwiftyFontIcon/Classes/SwiftyFontIcon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ extension UIImage {
let image = SwfIcon.instance.getUIImage(icon.name, iconSize: size, imageSize: CGSize(width: size, height: size), renderingMode: .alwaysTemplate)
if icon.localizable {
if directionProvider.isRtl(){
if let cgImage = image.cgImage {
return UIImage(cgImage: cgImage, scale: 1.0, orientation: .downMirrored)
} else {
return image
}
return image.imageFlippedForRightToLeftLayoutDirection().withRenderingMode(.alwaysTemplate)
}else{
return image
}
Expand Down