Skip to content

Instantly share code, notes, and snippets.

View ABashkirova's full-sized avatar
Peach Star

Alexandra Bashkirova ABashkirova

Peach Star
  • Clover, Wachanga LTD
  • Limassol, Cyprus
  • 05:51 (UTC +03:00)
View GitHub Profile
@ABashkirova
ABashkirova / BackdeployedWidgetAccentedRenderingMode.swift
Last active January 10, 2025 11:40
iOS 18 Widgets: Notes about updating the widget
import SwiftUI
import WidgetKit
@available(iOS, deprecated: 18.0, message: "use WidgetAccentedRenderingMode instead")
enum BackdeployedWidgetAccentedRenderingMode {
case accented
case accentedDesaturated
case desaturated
case fullColor
import SwiftUI
import PlaygroundSupport
struct WidgetWithCustomTimeView: View {
@State var hour: DateComponents = Date.currentHour
@State var minute: DateComponents = Date.currentMinutes
@State var timeColonState: ColonState = .paused
let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect()
var backgroundColor = Color(red: 0.961, green: 0.957, blue: 0.949)
import UIKit
// Василий Пономарев, доклад «Техническая сторона UI-компонентов»
protocol SimpleViewViewModel {
var title: String { get }
var subtitle: String { get }
var image: UIImage? { get }
}
@ABashkirova
ABashkirova / ViewControllerWithLoader.swift
Created May 18, 2021 20:01
Instagram Story Loading Animation
import UIKit
class ViewControllerWithLoader : UIViewController {
var fromColor: UIColor = UIColor(red: 138.0 / 255, green: 59.0 / 255, blue: 184.0 / 255, alpha: 1)
var toColor: UIColor = UIColor(red: 205.0 / 255, green: 71.0 / 255, blue: 107.0 / 255, alpha: 1)
var ringWidth: CGFloat = 8
var duration: TimeInterval = 4.5
override func loadView() {
let rootView = UIView(
@ABashkirova
ABashkirova / README.md
Created May 2, 2020 05:21
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

package di.logger
import kotlin.annotation.AnnotationRetention.RUNTIME
import kotlin.annotation.AnnotationTarget.*
@Target(FIELD)
@Retention(RUNTIME)
annotation class InjectLogger
# Name of the postmortem, e.g. “API Outage Postmortem”
## Date
When the incident happened, e.g. “30-05-2018”
## Authors
List of people who wrote the postmortem in the following format: