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 | |
let bag = DisposeBag() | |
let publisher = PublishSubject<Int>() | |
publisher | |
.ignoreElements() | |
.subscribe(onCompleted: { | |
print("completed") |
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
//You will want to create a Handler on the thread you wish to post code too. | |
// This makes Android development using code blocks far easier just like it can be on iOS. | |
public Handler mThreadHandler; | |
public void setupHandlerFromThreadMain() { | |
//Looper.prepare(); | |
//if you are setting this up from the Main thread, then there is already a looper. | |
mThreadHandler = new Handler(); | |
//Looper.loop(); |
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
//: A UIKit based Playground for presenting A Textview with Attributed String text | |
//: Demonstrates the use of 'stop: UnsafeMutablePointer<ObjCBool>' parameter in the block of code by using 'stop[0]=true' | |
//: Show the assistant editor to see the Text view output. | |
// designed with Swift 4.1 | |
import UIKit | |
import PlaygroundSupport | |
class MyViewController : UIViewController { | |
override func loadView() { |