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 RxSwift | |
import RxRelay | |
protocol IssueListRepositoryProtocol { | |
func fetch(page: Int) -> Single<[Issue]> | |
} | |
final class IssueListUseCase { | |
private let fetchTrigger = PublishRelay<FetchMode>() |
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
// origin | |
UIImageView *unHandleImg = [[UIImageView alloc] initWithFrame:CGRectMake((SCREENWIDTH-200)/2, 100, 200, 30)]; | |
unHandleImg.image = [UIImage imageNamed:@"theImage"]; | |
[self.view addSubview:unHandleImg]; | |
// with stretchable | |
UIImageView *handleImg = [[UIImageView alloc] initWithFrame:CGRectMake((SCREENWIDTH-200)/2, 200, 200, 30)]; | |
UIImage *img = [UIImage imageNamed:@"theImage"]; | |
// stretchable areas | |
img = [img resizableImageWithCapInsets:UIEdgeInsetsMake(35, 35, 35, 35) resizingMode:UIImageResizingModeStretch]; |
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
// Created by dsxsxsxs on 2020/09/15. | |
// | |
import RxSwift | |
import RxRelay | |
import RxTest | |
import XCTest | |
import Combine | |
@testable import RxPlayground | |
class FlatMapTest: XCTestCase { |
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
// | |
// StickToFirst.swift | |
// | |
// Created by dsxsxsxs on 2020/09/16. | |
// | |
import Foundation | |
import Combine | |
public struct StickToFirst<P, Upstream>: Publisher where P: Publisher, P == Upstream.Output, Upstream: Publisher, P.Failure == Upstream.Failure { |
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
// Created by dsxsxsxs on 2020/09/15. | |
// Copyright © 2020 me.dsxsxsxs.rx.playground. All rights reserved. | |
// | |
import RxSwift | |
import RxRelay | |
import RxTest | |
import XCTest | |
import Combine | |
@testable import RxPlayground |
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
default_platform(:ios) | |
platform :ios do | |
desc "Push a new beta build to TestFlight" | |
lane :beta do | |
build_app(scheme: "MUFG", include_bitcode: false, export_xcargs: "-allowProvisioningUpdates") | |
upload_to_testflight(skip_waiting_for_build_processing: true) | |
end | |
end |
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 { | |
var size: CGSize { | |
return size() | |
} | |
public func size(usingFont font: UIFont?) -> CGSize { | |
let f = font ?? UIFont.systemFont(ofSize: 16) | |
let attributes = [NSAttributedStringKey.font: f] | |
return self.size(withAttributes: attributes) |
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
#!/bin/sh | |
# fetch_cart_licenses.sh | |
# dsxs | |
# | |
# Created by dsxs on 2018/1/18. | |
# Copyright © 2018年 dsxsxsxs. All rights reserved. | |
# It'll be a good idea to automate this task by adding a run script into your build phase just like below. | |
# ${PROJECT_DIR}/fetch_carthage_licenses.sh ${PROJECT_DIR} |
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
// | |
// EventEmitter.swift | |
// dsxs | |
// | |
// Created by dsxs on 2017/7/28. | |
// Copyright © 2017年 dsxs. All rights reserved. | |
// | |
import Foundation |
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
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { | |
// no easing, no acceleration | |
linear: function (t) { return t }, | |
// accelerating from zero velocity | |
easeInQuad: function (t) { return t*t }, | |
// decelerating to zero velocity |
NewerOlder