PDA

View Full Version : Cut/Copy/Paste Menu For UILabel?




Darkroom
Nov 10, 2009, 03:44 PM
is it not possible to select/copy a static UILabel?



North Bronson
Nov 10, 2009, 09:34 PM
is it not possible to select/copy a static UILabel?

You might have to turn on user interaction and let it become the first responder.

Darkroom
Nov 10, 2009, 09:52 PM
You might have to turn on user interaction and let it become the first responder.

no dice. is this normal functionality for the iPhone's select/copy to work with static UILabels? have i missed the memo?

PhoneyDeveloper
Nov 11, 2009, 10:12 AM
I doubt that this functionality is built into labels. You will probably need to subclass UILabel to make this work.

Darkroom
Nov 11, 2009, 01:46 PM
i was about to simply use a non-editable, non-scrollable text view, but i'm unable to change the font attributes of a text view using IB. certainly anything is possible with subclassing and code, but i find the challenge more inciting than the new functionality.

maybe apple will update UILabel to be optionally selectable/copyable for next time.

dejo
Nov 11, 2009, 02:03 PM
i was about to simply use a non-editable, non-scrollable text view, but i'm unable to change the font attributes of a text view using IB.
No, but it can be done programatically.

PhoneyDeveloper
Nov 11, 2009, 03:20 PM
i'm unable to change the font attributes of a text view using IB.

Yes you can. Select the textview and choose Fonts > Show Fonts and choose your font.

And you're right, this should give you what you want. In fact there's no way to turn off that edit menu even if the text view is non-editable.

Darkroom
Nov 11, 2009, 04:23 PM
Yes you can. Select the textview and choose Fonts > Show Fonts and choose your font.

And you're right, this should give you what you want. In fact there's no way to turn off that edit menu even if the text view is non-editable.

oh perfect. now the only thing missing is the ability to vertically center the text according to the size of the text view with scrolling disabled.