Skip to content

Commit

Permalink
Merge pull request #10 from mohn93/hotfix/0.1.1
Browse files Browse the repository at this point in the history
Hotfix/0.1.1
  • Loading branch information
mohn93 authored Aug 10, 2020
2 parents 32df026 + b7fcab2 commit bf0ab90
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
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

0 comments on commit bf0ab90

Please sign in to comment.