StackTextView 1.0.1

StackTextView 1.0.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Apr 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Zheng-Xiang Ke.




  • By
  • Zheng-Xiang Ke

StackTextView

A text view that can dynamically adapt to the content size. All UIView can be stacked in the text view to implement the Facebook-like add-post UI.

CocoaPods GitHub stars GitHub forks CocoaPods Compatible Platform GitHub license

The following demo is that UIImageView and UIButton are stacked in the text view.

StackTextView

Requirements

  • iOS 8.0 or higher
  • Swift 3.0 or higher

Installation

pod "StackTextView"

Usage

Import

import StackTextView

StackTextView

The text view that can dynamically adapt to the content size.
var arranged​Subviews: [UIView] the list of views arranged by the stack text view.
var spacing: CGFloat the distance in points between the adjacent edges of the stack view’s arranged views. (default 0.0)

Functions

func addArrangedSubview(UIView)

Adds a view to the end of the arrangedSubviews array.

func insertArrangedSubview(UIView, at: Int)

Adds the provided view to the array of arranged subviews at the specified index.

func removeArrangedSubview(UIView)

Removes the provided view from the stack’s array of arranged subviews.

Apps using StackTextView

If you are using StackTextView in your app and want to be listed here, simply create a pull request.

I am always curious who is using my projects :)

Hikingbook - by Zheng-Xiang Ke

Hikingbook

Demo

StackTextViewDemo is a simple demo app which shows the usage of StackTextView.

Author

Zheng-Xiang Ke, [email protected]

License

StackTextView is available under the MIT license. See the LICENSE file for more info.