---
title: "An easier way to use standard buttons types in SwiftUI"
url: https://daily.dev/posts/an-easier-way-to-use-standard-buttons-types-in-swiftui-w4zjzdv4x
source_url: https://danielsaidi.com/blog/2024/04/30/an-easier-way-to-use-standard-button-types-in-swiftui
type: article
source: "Daniel Saidi"
published: 2026-07-05T07:14:06.179Z
updated: 2026-07-05T07:19:20.764Z
tags: ["ios", "swift", "swiftui", "localization"]
reading_time: 5
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# An easier way to use standard buttons types in SwiftUI

**[Daniel Saidi](https://daily.dev/sources/danielsaidi)** · 5 min read · 0 upvotes · 0 comments

## Summary

A practical approach to standardizing reusable button types in SwiftUI using a Swift enum. The pattern centralizes button definitions (add, delete, edit, done, etc.) with their SF Symbols icons, button roles, and localized titles in one place. A custom Button initializer accepts a StandardType value, automatically applying the correct role, icon, and localized string from a Swift package bundle. Custom titles and icons can still be overridden per usage. The solution integrates with Xcode 15's String Catalog for automatic localization. Known limitations include destructive button icon tinting bugs in Xcode 15.4 and constraints around applying view modifiers inside the initializer. The implementation is available in the open-source SwiftUIKit package.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://danielsaidi.com/blog/2024/04/30/an-easier-way-to-use-standard-button-types-in-swiftui>

---

Tags: [#ios](https://daily.dev/tags/ios), [#swift](https://daily.dev/tags/swift), [#swiftui](https://daily.dev/tags/swiftui), [#localization](https://daily.dev/tags/localization)

[View this post on daily.dev](https://daily.dev/posts/an-easier-way-to-use-standard-buttons-types-in-swiftui-w4zjzdv4x)
