Skip to content

Instantly share code, notes, and snippets.

View ricobeck's full-sized avatar
🏢
Working from office like an animal

Rico Becker ricobeck

🏢
Working from office like an animal
View GitHub Profile
import SwiftUI
struct ContentView: View {
@State var pictureExpanded = false
var body: some View {
VStack(alignment: .leading, spacing: 20.0) {
Text("Once upon a time there was a turtle named George who made friends with a giraffe at the local water park and then they went on lots of adventures together.")
Button {
@Intyre
Intyre / Wahoo_Elemnt.md
Last active April 11, 2024 06:52
Wahoo Elemnt - Tips, tricks and custom images
@alexshafran
alexshafran / gist:62243a7d0e24dded7b53
Last active December 17, 2017 21:12
Collections in Swift

#Collections in Swift

Arrays and dictionaries are the most common data stores in many applications. Swift has brought us a new generation of these collections, so let's take a look at how they compare to the collections found in Objective-C.

##Greatest Differences

###Typing One of the most obvious differences between collections in Objective-C and Swift is that Swift collections are explicitly typed. Typed collections are useful for many reasons, primarily because the system requires you to be precise with the content type you are working with. Any type mismatches will throw errors, which will help you avoid common mistakes.

###Mutability

@iamleeg
iamleeg / UIColor_literal.mm
Last active December 29, 2015 03:09
UIColor literals.
#import <UIKit/UIKit.h>
UIColor * operator"" _c(unsigned long long color)
{
unsigned long long redComponent = (color & 0xff0000 >> 16);
unsigned long long greenComponent = (color & 0x00ff00) >> 8;
unsigned long long blueComponent = color & 0xff;
float red = redComponent / 255.0;
float green = greenComponent / 255.0;
float blue = blueComponent / 255.0;
@letiemble
letiemble / openssl-maker.sh
Last active April 23, 2023 11:33
A bash script to generate "all-in-one" OpenSSL static libraries for OS X and iOS. The script produces fat static libraries (i386, x86_64 for OS X) and (i386, x86_64, armv7, armv7s, arm64 for iOS) suitable for integration in both OS X and iOS project.
#!/bin/bash
###############################################################################
## ##
## Build and package OpenSSL static libraries for OSX/iOS ##
## ##
## This script is in the public domain. ##
## Creator : Laurent Etiemble ##
## ##
###############################################################################