Skip to content

Commit

Permalink
Rename method parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Merve Sahan committed Jan 19, 2023
1 parent dbc78a5 commit 7b749b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions VariableFonts/VariableFonts/Extensions/UIView+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public enum FontVariations: Int, CustomStringConvertible {

// MARK: - Font
public extension Font {
static func variableFont(_ size: CGFloat, axes: [Int: Int] = [:]) -> Font {
let uiFontDescriptor = UIFontDescriptor(fontAttributes: [.name: "Roboto Flex", kCTFontVariationAttribute as UIFontDescriptor.AttributeName: axes])
static func variableFont(_ size: CGFloat, axis: [Int: Int] = [:]) -> Font {
let uiFontDescriptor = UIFontDescriptor(fontAttributes: [.name: "Roboto Flex", kCTFontVariationAttribute as UIFontDescriptor.AttributeName: axis])
let newUIFont = UIFont(descriptor: uiFontDescriptor, size: size)
return Font(newUIFont)
}
Expand Down
2 changes: 1 addition & 1 deletion VariableFonts/VariableFonts/Resources/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct ContentView: View {
VStack {
Text("Variable Fonts Example Text")
.font(.variableFont( 24.0,
axes: axisValue))
axis: axisValue))
}.padding(.vertical)
ScrollView {
VStack(spacing: 16) {
Expand Down

0 comments on commit 7b749b6

Please sign in to comment.