show smiley icons into an uitextfield - iphone

I would like to show list of emotion icons / smiley icons when tap of a button. on selecting any, i want that icon to placed on my uitextview.
Is there any options to do with iPhone app , if not will it require more time to get it
Please let me know and thanks

NSAttributedString is a option to archive your goal.
There is a project you may have a look:
emotionlabel
It's based on DTCoreText project which enables you drawing simple rich text like any HTML document without having to use a UIWebView.

Take one UIImage that looks like UITextField and set it on the UILabel background image. Once the emoticon is selected, put it on the UILabel. Hope that would help you.

Related

Display colorful text in iPhone

Is there any way to display colorful text in iPhone without using UIWebView
Eg "red blue green voilet"
all in single UITextView, UITextField, UILabel or anything except UIWebview.
Is it possible at all?
Yes, you can use a NSAttributed string and then supply that to a CATextLayer or an open source library like AliSoftware's OHAttributedLabel.
Here's a related question that may help you out.

how can I highlight only background of the text on touch on a UILabel

In my app, I have modified the UILabel and made it underline the text if the phone number or email appears.
but I want to highlight the text when the phone number or email is touched as shown below (I want something like what has been shown below by the dark gray highlight in background of the text "http://www.foodreporter.net".
I want to do this without use of CoreText as my app targets from iOS 3.1.2 onwards. So I don't want to use the CoreText and Attributed strings.
I want to subclass the UILabel and do it somehow. How can it be done?
I don't have the option to use OHAttributedLabel and TTTAttributedLabel.
I suggest for a workaround. What you can do is, use custom UIButton instead of label. Set the default and highlighted image of the button according to your need.(Simple text for default, and highlighted text for highlighted).
Happy Programming

In iOS, how do you embed images inline with text (in a UITextView)?

How can you create a UITextView that can have images inline? I looked up NSAttributedString, but it seems iOS does not support image attachments. Any ideas for an editable text view that can display images (I suppose RTF would do this)?
Thanks in advance for your help!
The only method I am aware of is to use a UIWebView. There is no way to add images to a UITextView, unfortunately, just plain text.
You could use the NSTextAttachment class. It lets you insert images inline of text.
I found an example of this in a cool project here: https://github.com/dzog/ImgGlyph. ImgGlyph provides UITextView and UILabel subclass implementations that help you replace specific strings with images and ensures they're sized correctly with respect to the text surrounding it.

Underline / Bold in UITextView

Is it possible to underline or embolden certain bits of text in a UITextView?
For example my Text View has headings in it, and would like those underlined...
Random Mode
In random mode, you can generate numbers...
Sweepstake Mode
In sweepstake mode...
If not, what is the best way to achieve this?
Thanks
Use should use NSAttributedString, and use controllers for drawing NSAttributesString.
Controller for NSAttributedString
Note: you can't use UITextView to display a NSAttributedString
Update
From iOS6, UILabel now support NSAttributedString, you should use UILabel directly instead of OHAttributedLabel as it is now natively supported by the OS.
I believe NSAttributedString is what you're after, it's available in iOS 3.2 or later: look at this question
I know this is an old thread, but this is something I just discovered myself. At least in Xcode version 4.6.3 this is possible by using an attributed textView. What's even better is that it's possible to all be done in Interface Builder!
Here are the steps:
Place your textView at the desired location
Select the textView and open up the Attributes tab under the Utilities panel
Change the textView text to "attributed"
Enter your desired text
Now, highlight whatever text you want bolded, underlined, etc.
Click on the "T" button next to the fontName
In the popup, select your desired typeface (ex: Bold)
You should see the desired typeface displayed in the Utilities panel
Enjoy!

Displaying a URL in a UITableViewCell in a different color from the rest of the text

I'm working through the Stanford iPhone programming course online. The Presence app assignment pulls Twitter and displays each one in a separate UITableViewCell.
Updates often include URL's and I'd like to know how to display just the URL text in blue, having it be tappable. I can parse the text for URL's with no problem, just no idea how to display the URL itself.
Any advice or suggestions would be greatly appreciated.
As said above a button would work, but in terms of the UI it would probably look more natural if you had a label.
Alternatively, you could fill the UITableViewCell with a UIWebView. The UIWebView would hold all the text and you should easily be able to set part of the text as a link (color blue) using html.
You'll have to add a UIButton (or something similar) to the cell, with the button title being the URL and the action opening the actual link.