ios - pod 'ReadMoreTextView' is not working. Swift 2.3 How to add ReadMore Button in TextView? -
my code in picture:
when add read more text code can not see in view. basicly doesn't working. how can make textview read more tag. there pod or have solution ? i'm using swift 2.3
i pretty sure problem because haven't assign frame textview try adding frame
let textview:readmoretextview = readmoretextview.init(frame: cgrect.init(x: 0, y: 0, width: 100, height: 150)) textview.text = "sadkhfasdjfkasdklf lskadj fklsad jflskad jflk asdlfkjsaldk fjlsdakjflasdjlfkjsadlkfjlsakdjf ldsjflj lkdsjflaksdflkj dfjlkdsjflkj lkdjfalkjflsdk jfklsdjflksdjflkdsjlkf salkf" textview.maximumnumberoflines = 4 textview.shouldtrim = true textview.isscrollenabled = false textview.attributedreadlesstext = nsattributedstring(string:"read less") textview.attributedreadmoretext = nsattributedstring(string:"readmore") textview.delegate = self self.view.addsubview(textview)
Comments
Post a Comment