Skip to content

Instantly share code, notes, and snippets.

View SwiftArchitect's full-sized avatar

Xavier Schott SwiftArchitect

View GitHub Profile
@SwiftArchitect
SwiftArchitect / Main.storyboard
Last active March 20, 2016 15:39
Autolayout & Columns. See the full article at http://swiftarchitect.com/autolayout-columns/, and the StackOverflow question at http://stackoverflow.com/questions/31658526/using-autolayout-to-stack-within-two-columns-of-varying-heights/31804168#31804168. Copyright (c) 2015 Xavier Schott, MIT License
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
@SwiftArchitect
SwiftArchitect / Twitter
Last active August 29, 2015 14:26
#import Twitter & #import Accounts test for iOS. Source code for StackOverflow question http://stackoverflow.com/questions/31723267. Copyright (c) 2015 Xavier Schott, MIT License
//
// ViewController.swift
// SO-Twitter
//
// Created by SwiftArchitect on 8/8/15.
// Copyright (c) 2015 Xavier Schott
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
@SwiftArchitect
SwiftArchitect / ImageViewLayoutAssistant.swift
Last active March 8, 2016 20:06
Swift Autolayout Assistant UIView. Can also be applied to UITableView. See an example use case scenario on http://stackoverflow.com/questions/31907014/ Copyright (c) 2015 Xavier Schott. All rights reserved. MIT License.
//
// ImageViewLayoutAssistant.swift
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
@SwiftArchitect
SwiftArchitect / FacebookAppDelegate.swift
Last active August 31, 2015 07:34
Facebook SDK iOS Swift Integration Xcode 7, related to StackOverflow http://stackoverflow.com/questions/32302877. To download the full project, search for SO-32302877 on http://swiftarchitect.com/.
// Copyright (c) 2015 Xavier Schott
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
@SwiftArchitect
SwiftArchitect / InvertImage.swift
Created October 19, 2015 20:50
Back & White Invert IBDesignable UIImageView
//
// InvertImage.swift
//
// Copyright © 2015 Xavier Schott
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@SwiftArchitect
SwiftArchitect / FlickrSearcher.swift
Created January 28, 2016 23:00 — forked from john-difool/FlickrSearcher.swift
FlickrSearcher.swift updated for iOS 9 / XCode 7 / Swift 2.x
//
// FlickrSearcher.swift
// flickrSearch
//
// Created by Richard Turton on 31/07/2014.
// Modified by John Difool on 10/01/2015.
// Copyright (c) 2014 Razeware. All rights reserved.
//
import Foundation
//
// TableViewController.swift
// SO-14995573
//
// Copyright © 2016 Xavier Schott
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@SwiftArchitect
SwiftArchitect / UIImageView.startAnimating()
Created February 19, 2016 16:05
Loads a set of UIImage named "win_1" to "win_16" from Assets catalog and animate in a UIImageView
//
// ViewController.swift
// SO-35412222
//
// Copyright © 2016 Xavier Schott
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@SwiftArchitect
SwiftArchitect / InterviewCake-StockPrice.swift
Last active February 19, 2018 06:46
Xcode Swift Functional Programming alternative and Unit Test for InterviewCake stock price question. ⚠️ For the full experience, join https://interviewcake.com and visit https://www.interviewcake.com/question/swift/stock-price
//
// InterviewCake-StockPrice.swift
//
// Copyright © 2018 Xavier Schott
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@SwiftArchitect
SwiftArchitect / InterviewCake-Array+ProductsOfAllIntsExceptAdIndex.swift
Last active February 25, 2018 00:37
Swift Xcode implementation of InterviewCake _Product of integers in an array_ using an `Array` extension. ⚠️ Spoiler alert: this is an actual answer to the https://www.interviewcake.com/question/swift/product-of-other-numbers question, so no peeking!
//
// Array+ProductsOfAllIntsExceptAdIndex.swift
//
// Copyright © 2018 Xavier Schott
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: