Skip to content

Instantly share code, notes, and snippets.

View tobitech's full-sized avatar
🌎
Changing the World

Tobi Omotayo tobitech

🌎
Changing the World
View GitHub Profile
import Foundation
extension Locale {
func localizedCurrencySymbol(forCurrencyCode currencyCode: String) -> String? {
guard let languageCode = languageCode, let regionCode = regionCode else { return nil }
/*
Each currency can have a symbol ($, £, ¥),
but those symbols may be shared with other currencies.
For example, in Canadian and American locales,
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@tobitech
tobitech / CustomSegmentedControl.swift
Last active December 6, 2019 21:37
A custom segmented control with modern design. Support for Titles, subtitles with and or only images. Can also be used in Interface builder
//
// CustomSegmentedControl.swift
// CustomSegmentedControl
//
// Created by Oluwatobi Omotayo on 06/09/2019.
// Copyright © 2019 Oluwatobi Omotayo. All rights reserved.
//
import UIKit
@tobitech
tobitech / CFCustomeImageView.h
Last active May 19, 2017 15:12
This is a UIImageView Subclass that has caching support. Good for use in TableViews and CollectionViews cells
//
// CFCustomeImageView.h
//
// Created by Tobi Omotayo on 24/10/2016.
// Copyright © 2016 Tobi Omotayo. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface CFCustomeImageView : UIImageView {
@sauvikatinnofied
sauvikatinnofied / MediumBlogFontHandling_FullCode.swift
Last active October 25, 2023 14:57
MediumBlogFontHandling_FullCode
import Foundation
import UIKit
// Usage Examples
let system12 = Font(.system, size: .standard(.h5)).instance
let robotoThin20 = Font(.installed(.RobotoThin), size: .standard(.h1)).instance
let robotoBlack14 = Font(.installed(.RobotoBlack), size: .standard(.h4)).instance
let helveticaLight13 = Font(.custom("Helvetica-Light"), size: .custom(13.0)).instance
struct Font {
@cwagdev
cwagdev / CreditCard.swift
Last active June 27, 2019 10:04
Credit Cards represented in Swift
/// Describes a type of credit card for a subset of known types.
enum CreditCardType: Printable {
case Amex, DinersClub, Discover, JCB, MasterCard, Visa, Unknown
var description: String {
switch self {
case .Amex:
return "Amex"
case .DinersClub:
return "Diners Club"