Skip to content

Instantly share code, notes, and snippets.

View grzegorzkrukowski's full-sized avatar

Grzegorz Krukowski grzegorzkrukowski

  • Digitalnet
  • Berlin
View GitHub Profile
@grzegorzkrukowski
grzegorzkrukowski / reveal_secrets_workflow
Created February 22, 2024 10:55
Workflow to release secrets through a GITHUB action
name: Reveal secrets
on: workflow_dispatch
jobs:
debug:
name: Debug
runs-on: ubuntu-latest
steps:
- name: Show secrets
run: |
@grzegorzkrukowski
grzegorzkrukowski / UILabelPreferedWidth
Created May 17, 2017 15:43
Fixing problem of using Label with autosizing cells
class UILabelPreferedWidth : UILabel {
override var bounds: CGRect {
didSet {
if (bounds.size.width != oldValue.size.width) {
self.setNeedsUpdateConstraints()
}
}
}
override func updateConstraints() {
@grzegorzkrukowski
grzegorzkrukowski / CALayer+Pause.swift
Created May 12, 2017 10:34
Solving the problem of CALayer animations being removed when application goes to background
//
// CALayer+Pause.swift
//
// Created by Grzegorz Krukowski on 11/05/2017.
// Copyright © 2017. All rights reserved.
//
import Foundation
extension CALayer {
@grzegorzkrukowski
grzegorzkrukowski / UITableView+Registration.swift
Created March 9, 2017 01:15
UITableView and UICollectionView extensions that allows to auto-register cells and extends both with simplified interfaces for dequeuing Edit
public protocol CellRegistration: class {
static var reuseIdentifier: String { get }
}
extension CellRegistration where Self: UIView {
public static var reuseIdentifier: String {
return String(describing: self)
}
}