Skip to content

Instantly share code, notes, and snippets.

@soniccat
soniccat / ControllerViewLifecycleOwner
Last active Mar 16, 2020
Conductor ControllerViewLifecycleOwner
View ControllerViewLifecycleOwner
// To use it add
// val viewLifecycleOwner: ControllerViewLifecycleOwner<BaseViewController>
// by lazy { ControllerViewLifecycleOwner(this) }
// in you BaseViewController
class ControllerViewLifecycleOwner<T>(lifecycleController: T) :
LifecycleOwner where T : LifecycleOwner, T : Controller {
private val controllerRef = WeakReference(lifecycleController)
private var lifecycleRegistry: LifecycleRegistry? = null
private set
@soniccat
soniccat / NSString+MCHTMLToPlainTextConversion.h
Created Oct 5, 2012 — forked from drewmccormack/NSString+MCHTMLToPlainTextConversion.h
Convert a NSString with HTML into a plain text string using NSXMLParser.
View NSString+MCHTMLToPlainTextConversion.h
#import <Foundation/Foundation.h>
@interface NSString (MCHTMLToPlainTextConversion)
-(NSString *)stringByConvertingHTMLToPlainText;
@end
You can’t perform that action at this time.