Skip to content

Instantly share code, notes, and snippets.

View wzio's full-sized avatar
🎯
Focusing

wkdev wzio

🎯
Focusing
View GitHub Profile
@wzio
wzio / AuthenticationStateExample.swift
Created December 14, 2023 09:42 — forked from buh/AuthenticationStateExample.swift
Example for a Finite-State Machine
/// The authentication state.
enum AuthenticationState: StateType {
// A list of events.
enum Event {
case userSignIn(email: String, password: String)
case accessTokenReceived(AccessToken)
case userReceived(User)
case userSignedOut
}
@wzio
wzio / synchronizing-rotation-animation-part-2.m
Created July 30, 2018 03:10 — forked from smnh/synchronizing-rotation-animation-part-2.m
Synchronizing rotation animation between the keyboard and the attached view - Part 2
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(keyboardWillChangeFrame:)
name:UIKeyboardWillChangeFrameNotification object:nil];
}
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];