Author: Chris Lattner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AppDelegate.swift | |
// SwiftUITestApp | |
// | |
// Created by Matt Gallagher on 4/6/24. | |
// Copyright © 2019 Matt Gallagher. All rights reserved. | |
// | |
import Cocoa | |
import SwiftUI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store | |
.tags* | |
/.idea/ | |
/build/ | |
/dist/ | |
/external_binaries/ | |
/out/ | |
/vendor/download/ | |
/vendor/debian_jessie_amd64-sysroot/ | |
/vendor/debian_jessie_arm-sysroot/ |
I am searching experienced Swift freelancers for a disruptive, well-funded high-tech startup in the renewable energies sector located in Germany.
You will play a major role in making the world greener, the future brighter and energy distribution smarter by using latest technologies like server-side Swift, microservices, artificial intelligence and machine learning and new interfaces like chatbots, voice-only (Alexa, Google Home) and goal-driven dialog systems.
A substantial track record in open-source projects, a set of already released iOS apps on the App Store and a timezone difference of max 2 hours to Berlin local time are a must-have.
Your job:
- build our chat-based iOS app and optionally later the Android app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The trick is to link the DeviceSupport folder from the beta to the stable version. | |
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
# (A similar approach works for older versions too, just change the version number after DeviceSupport) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### | |
# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups) | |
# | |
# This is complicated: | |
# | |
# SOMETIMES you need to put this file in version control. | |
# Apple designed it poorly - if you use "custom executables", they are | |
# saved in this file. | |
# 99% of projects do NOT use those, so they do NOT want to version control this file. | |
# ..but if you're in the 1%, comment out the line "*.pbxuser" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum SizeMatching { | |
case Width, Height, Both, None | |
} | |
class IKScrollView: UIScrollView { | |
//MARK: - Outlets | |
@IBOutlet private var contentView: UIView? | |
//MARK: - Properties | |
@IBInspectable var sizeMatching = SizeMatching.Width |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol DictionaryConvertable { | |
static func fromDictionary(dictionary: [String: AnyObject]) throws -> Self | |
func toDictionary() -> [String: AnyObject] | |
} | |
protocol DictionaryValueType { | |
func dictionaryValue() -> AnyObject? | |
} | |
extension Optional: DictionaryValueType { | |
func dictionaryValue() -> AnyObject? { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol KeyValueStorable { | |
subscript (key: String) -> AnyObject? { get set } | |
mutating func removeAll() -> Void | |
} | |
extension NSUserDefaults: KeyValueStorable { | |
subscript (key: String) -> AnyObject? { | |
get { return self.objectForKey(key) } | |
set { self.setObject(newValue, forKey: key) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension String { | |
func size(withAttributes attrs: [String:AnyObject], constrainedTo box: NSSize) -> NSRect { | |
let storage = NSTextStorage(string: self) | |
let container = NSTextContainer(containerSize: NSSize(width: box.width, height: box.height)) | |
let layout = NSLayoutManager() | |
layout.addTextContainer(container) | |
storage.addLayoutManager(layout) | |
storage.addAttributes(attrs, range: NSMakeRange(0, storage.length)) | |
container.lineFragmentPadding = 0.0 | |
let _ = layout.glyphRangeForTextContainer(container) |
NewerOlder