Skip to content

Commit

Permalink
[GH-1440] - Renamed the insert method in the uiimage extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
vincethecoder committed Jul 26, 2018
1 parent 2494cc6 commit afc19bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions MapboxNavigation/RouteMapViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -848,11 +848,11 @@ extension RouteMapViewController: NavigationViewDelegate {
let textHeight = font.lineHeight
let pointY = (shieldImage.size.height - textHeight) / 2

let compositeImage = shieldImage.composited(text: (text as NSString),
color: color ?? .black,
font: font,
atPoint: CGPoint(x: 0, y: pointY),
scale: UIScreen.main.scale)
let compositeImage = shieldImage.insert(text: (text as NSString),
color: color ?? .black,
font: font,
atPoint: CGPoint(x: 0, y: pointY),
scale: UIScreen.main.scale)

attachment.image = compositeImage

Expand Down
2 changes: 1 addition & 1 deletion MapboxNavigation/UIImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extension UIImage {
return tintedImage
}

func composited(text: NSString, color: UIColor, font: UIFont, atPoint: CGPoint, scale: CGFloat) -> UIImage? {
func insert(text: NSString, color: UIColor, font: UIFont, atPoint: CGPoint, scale: CGFloat) -> UIImage? {
UIGraphicsBeginImageContextWithOptions(size, false, scale)

let textStyle = NSMutableParagraphStyle()
Expand Down

0 comments on commit afc19bf

Please sign in to comment.