Skip to content

Instantly share code, notes, and snippets.

View hemant3370's full-sized avatar
😃
Focusing

Hemant Singh hemant3370

😃
Focusing
View GitHub Profile
UIImageView *imageView = [[UIImageView alloc] initWithFrame:frame];
imageView.animationImages = [self animationImages]; //method to return an array of UIImage objects
imageView.animationDuration = 0.5; //could be whatever you want
[imageView startAnimating]; //for starting animation
[imageView stopAnimating]; //for ending animation
//
// UIBarButtonItem+Badge.swift
// PiGuardMobile
//
// Created by Stefano Vettor on 12/04/16.
// Copyright © 2016 Stefano Vettor. All rights reserved.
//
import UIKit
@sauvikatinnofied
sauvikatinnofied / ShimmerView.swift
Created April 11, 2017 19:41
List Load Showing Shimmer View
import UIKit
class ShimmerView: UIView {
var primaryColor: UIColor = UIColor(red: 214.0/255.0, green: 214.0/255.0, blue: 214.0/255.0, alpha: 1.0)
var animationColor: UIColor = .white
@inamiy
inamiy / SwiftElmFrameworkList.md
Last active March 11, 2024 10:20
React & Elm inspired frameworks in Swift
@smileyborg
smileyborg / InteractiveTransitionCollectionViewDeselection.m
Last active January 15, 2023 13:03
Animate table & collection view deselection alongside interactive transition (for iOS 11 and later)
// UICollectionView Objective-C example
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
NSIndexPath *selectedIndexPath = [[self.collectionView indexPathsForSelectedItems] firstObject];
if (selectedIndexPath != nil) {
id<UIViewControllerTransitionCoordinator> coordinator = self.transitionCoordinator;
if (coordinator != nil) {
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {