Skip to content

Instantly share code, notes, and snippets.

View MacMark's full-sized avatar

Markus Möller MacMark

View GitHub Profile
@MacMark
MacMark / UITabBar+Badge.swift
Created February 1, 2023 16:24 — forked from MrBoog/UITabBar+Badge.swift
UITabBar+Badge
import Foundation
fileprivate let tabBarItemTag: Int = 10090
extension UITabBar {
public func addItemBadge(atIndex index: Int) {
guard let itemCount = self.items?.count, itemCount > 0 else {
return
@MacMark
MacMark / C_right_left_rule.c
Created June 28, 2022 16:36 — forked from muxuezi/C_right_left_rule.c
The "right-left" rule is a completely regular rule for deciphering C declarations. It can also be useful in creating them.
/*The "right-left" rule is a completely regular rule for deciphering C
declarations. It can also be useful in creating them.
First, symbols. Read
* as "pointer to" - always on the left side
[] as "array of" - always on the right side
() as "function returning" - always on the right side
as you encounter them in the declaration.