Commit 66f6d9b4 authored by Bruno Coelho's avatar Bruno Coelho

Make Swift code more idiomatic

parent 9400d376
//
// TXSTextboxListenerImpl.swift
// TextSort
//
// Created by Bruno Coelho on 10/03/2017.
// Copyright © 2017 Dropbox, Inc. All rights reserved.
//
import UIKit
@objc class TXSTextboxListenerDebugableImpl : NSObject, TXSTextboxListener {
private var textView_: UITextView
final class TXSTextboxListenerDebugableImpl : NSObject, TXSTextboxListener {
private var textView: UITextView
@available(*, unavailable)
override init() {
fatalError("Unsupported")
}
@objc(initWithUITextView:)
init (textView: UITextView) {
textView_ = textView
init(textView: UITextView) {
self.textView = textView
}
@objc func update(_ items: TXSItemList) {
func update(_ items: TXSItemList) {
let string = items.items.joined(separator: "\n")
print("TXSTextboxListenerDebugableImpl -> update \n\(string)")
textView_.text = string
textView.text = string
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment