0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SwiftUI ShareLinkの見た目変更方法

Posted at

ShareLinkを簡単に実装はできますが、UIを変更したい場合があると思います。

その場合の実装です。

サンプル実装

ShareCustomText.swift
struct ShareCustomText: View {
    var body: some View {
        ShareLink(item: "Share Text") {
            HStack {
                Image(systemName: "square.and.arrow.up.circle.fill")
                Text("Share Link")
            }
            .frame(width: 200, height: 200)
            .border(Color.black, width: 2)
        }
    }
}

Buttonのような感じでレイアウトを変更することができるみたいです。
レイアウトの変更も簡単にできるので良さそうですね。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?