UILabel: wrap and/or break inside word(s) with hyphen(s)

Elaborating on Matt’s answer here: https://stackoverflow.com/a/16502598/196358 it can be done using NSAttributedString and NSParagraphStyle. See below: NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; paragraphStyle.hyphenationFactor = 1.0f; NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:titleString attributes:@{ NSParagraphStyleAttributeName : paragraphStyle }]; self.titleLabel.attributedText = attributedString; This will cause the label to break at logical places mid-word using hyphens. It looks great, … Read more

How to make Jqgrid frozen column word-wrap

Starting with version 4.3.2 jqGrid supports Events which allows to register multiple callbacks (event handler). Old internal callbacks like _complete were removed. Instead of the line in the demo $grid[0].p._complete.call($grid[0]); you can use now $grid.triggerHandler(“jqGridAfterGridComplete”); UPDATED: The current version of jqGrid have a bug in the line. It will be used this instead of ts: … Read more

How to wrap lengthy text in a spinner? [duplicate]

Step 1. TextView with wrapped text The first thing to do is to to force simple TextView to wrap text. Its easy: <TextView android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:singleLine=”false” android:text=”very long text that will be wrapped to next line” /> Note the singleLine attribute here. Step 2. Custom layout Now we should somehow set singleLine attribute to false … Read more