- Размер иконки - один универсальный 1024х1024
- Без альфа-каналов
- Квадрат
- Избегать маленьких деталей
- Сохранять простоту и иконки чтобы избегать "замусоренности" на фоне других иконок
- Текст может быть если только это не одна из основных функций приложения (Первые буквы приложения не в счет)
- Можно сделать простой фон и необязательно заполнять контентом всю иконку
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
// MARK: - CustomCalendar | |
struct CustomCalendar: View { | |
var calendar: Calendar | |
let yearFormatter: DateFormatter | |
let monthFormatter: DateFormatter | |
let dayFormatter: DateFormatter | |
let weekDayFormatter: DateFormatter | |
let fullFormatter: DateFormatter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Created by Helge Heß on 06.04.21. | |
// Modified by Kovs705 on 04.10.2023 | |
// Also available as a package: https://github.com/ZeeZide/SVGWebView | |
import SwiftUI | |
import WebKit | |
/** | |
* Display an SVG using a `WKWebView`. | |
* | |
* Used by [SVG Shaper for SwiftUI](https://zeezide.de/en/products/svgshaper/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MARK: - Combine | |
/// Combine function to observe parameters in @ObservableObject | |
/// | |
/// Example: | |
/// _ = newBindChangePublisher(for: <yourState object>, publisher: <yourStateObject>.$<parameter>.eraseToAnyPublisher(), keyPath: \.<parameter>, with: 0.4, handleAction: { [weak self] <nameOfParametersValue> in | |
/// guard let self = self else { return } | |
/// // perform action with the <nameOfParametersValue> | |
/// }) | |
/// | |
/// - Parameters: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val generateIos: TaskProvider<Task> by tasks.registering { | |
if (isFamily(FAMILY_MAC)) { | |
val xcodeGenPath = "/usr/local/bin/xcodegen" | |
val specPath = "${project.rootDir}/_____IOS___FOLDER____/Project.yml" | |
doLast { | |
exec { | |
commandLine(xcodeGenPath, "generate", "--spec", specPath) | |
} | |
} | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val generateLocalization: TaskProvider<Task> by tasks.registering { | |
dependsOn("linkPodDebugFrameworkIosArm64") | |
fun generateIOSLocalizableStrings(androidStrings: String): String { | |
val regex = Regex("<string name=\"(.*?)\">(.*?)</string>") | |
val matches = regex.findAll(androidStrings) | |
val iosStrings = StringBuilder() | |
for (match in matches) { | |
val key = match.groupValues[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import ComposableArchitecture | |
struct Main: Reducer { | |
var body: some Reducer<Main.State, Main.Action> { | |
Reduce { state, action in | |
return .none} | |
} | |
enum Action: Equatable { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import Combine | |
struct OTPTextFieldView: View { | |
private enum FocusField: Hashable { | |
case field | |
} | |
@State var text = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Color+Ext.swift | |
// YourApp | |
// | |
// Created by Eugene Kovs on 06.03.2024. | |
// https://github.com/kovs705 | |
// | |
import SwiftUI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension View { | |
@ViewBuilder | |
func applyIfTrue<Content: View>(_ condition: @autoclosure () -> Bool, | |
ifTrue applyTrue: (Self) -> Content) -> some View { | |
if condition() { | |
applyTrue(self) | |
} else { | |
self | |
} |
OlderNewer