kokoichi206 / ios-app

1 stars 1 forks source link

memo #2

Open kokoichi206 opened 2 years ago

kokoichi206 commented 2 years ago

同期処理しか受け付けない onTapGesture の中で非同期処理を行う方法

.onTapGesture {
            Task.init {
                await authenticationManager.authenticateWithBiometrics()
            }
        }
kokoichi206 commented 2 years ago

SF Symbols

このページからシンボル一覧をダウンロードする。

そのソフトを起動するとアイコン名(idみたいなもの)が確認できるので、その名前を用いて以下のように画像を表示(例)

Image(systemName: imageName)
    .resizable()
    .renderingMode(.template)
    .aspectRatio(contentMode: .fit)
    .frame(width: 25, height: 25)
    .foregroundColor(
        currentTab == image ? Color.black : Color.gray.opacity(0.8)
    )
kokoichi206 commented 2 years ago

Profile Picture

Image("Profile")
    .resizable()
    .aspectRatio(contentMode: .fill)
    .frame(width: 45, height: 45)
    .clipShape(Circle())
kokoichi206 commented 2 years ago

ignoresSafeArea

sort

let filterd = self.storedTasks.filter {
    return calendar.isDate($0.taskDate, inSameDayAs: self.currentDay)
}
    .sorted { task1, task2 in
        return task2.taskDate < task1.taskDate
    }
kokoichi206 commented 2 years ago

Tips