diff --git a/Source/UIKitExtensions.swift b/Source/UIKitExtensions.swift index 9a82098..7aec073 100644 --- a/Source/UIKitExtensions.swift +++ b/Source/UIKitExtensions.swift @@ -77,7 +77,12 @@ public extension UINavigationController { let spacer = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.fixedSpace, target: nil, action: nil) spacer.width = -10 - items.append(contentsOf: positionLeft ? [spacer, item] : [item, spacer]) + if positionLeft { + items.append(contentsOf: [spacer, item]) + } else { + items.insert(contentsOf: [spacer, item], at: 0) + } + return items } }