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
import Combine | |
class Foo { | |
var blurValuePublisher: AnyPublisher<Float, Never> { | |
_blurValuePublisher.eraseToAnyPublisher() | |
} | |
private var _blurValuePublisher: CurrentValueSubject<Float, Never> | |
init() { |
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
import Combine | |
import Foundation | |
class CombineExampleBase { | |
@Published var baseValue: Int | |
init(baseValue: Int) { | |
self.baseValue = baseValue | |
} | |
} |
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
class Curried { | |
let x: Int | |
init(x: Int) { | |
self.x = x | |
} | |
func yummy() -> String { | |
"Curry is \(x)" | |
} |
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
/// PrintIt.swift | |
@objcMembers public class PrintIt: NSObject { | |
func printIt(_ dict: [String : String]) { | |
print(dict) | |
} | |
} | |
/// ViewController.m | |
#import <PrintIt-Swift.h> |
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
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/DerivedData/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" /> | |
# More Info: https://help.backblaze.com/hc/en-us/articles/220973007-Advanced-Topic-Setting-Custom-Exclusions-via-XML |
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
// | |
// KnobView.swift | |
// | |
// Created by Steve Riggins on 6/30/19. | |
// Copyright © 2019 Steve Riggins. All rights reserved. | |
// | |
import SwiftUI | |
struct KnobView : View { |
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
// | |
// ContentView.swift | |
// X | |
// | |
// Created by Steve Riggins on 6/29/19. | |
// Copyright © 2019 Steve Riggins. All rights reserved. | |
// | |
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
// Example of encoding and decoding a Swift Dictionary | |
let d = [ | |
"Casey": 35, | |
"Erin": 34, | |
"Declan": 2 | |
] | |
print("Original Dictionary: \(d)") | |
let encoder = JSONEncoder() | |
if let encoded = try? encoder.encode(d) |
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
import UIKit | |
// This is just an example for figuring out DEBUG | |
// issues. Strings are used for simplicity of the demo | |
// In the actual code, structs are returned | |
// The goal is to have none of the code related to PathDebug | |
// end up in production code | |
public enum Paths { | |
case PathOne |
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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
self.listPriceLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 10, 10)]; | |
self.listPriceLabel.backgroundColor = [UIColor yellowColor]; | |
[self.view addSubview:self.listPriceLabel]; | |
[self.listPriceLabel sizeToFit]; | |
self.listPriceLabel.text = @"Hello World"; |
NewerOlder