Skip to content

Instantly share code, notes, and snippets.

View evgeniyd's full-sized avatar
🌚

Yevhen Dubinin evgeniyd

🌚
View GitHub Profile
@evgeniyd
evgeniyd / NoteViewController.swift
Last active January 18, 2017 06:57
Swift 3: @autoclosure syntax to call functions upon UIAlertViewController's callbacks
/// The Medium artcile, discussing the approach
/// https://medium.com/@euginedubinin/swift-useful-autoclosure-when-presenting-uialertviewcontroller-b592d1643a50#.kx0fuqm1x
final class NoteViewController: UIViewController {
// ... set up target-action for an Edit UIButton somewhere here ...
private dynamic func handleEditButton() {
presentEditConfirmationDialog(onEdit: self.editArticle(),
onCancel: () ) /* assuming you have nothing to do upon cancellation */
@evgeniyd
evgeniyd / ContainerView.m
Created September 27, 2024 06:42
RecognizeGesturesBetweenScrollViewAndButton
/*
The layout (notice how button is 50% on top of the collection view
while still added to the ContainerView)
|----------------------------------------------------|
| ContainerView |
| ------------------------------------------------ |
| | CollectionView | |
| | ___________ | |
| | | | | |