How insert blue text tokens inside UITextField? - iphone

Is there a way to make the UITextField (or some class similar) create this blue text token natively? If not, someone knows any example code that's similar?

I've not had a chance to test it out, but this might be of interest to you:
http://cocoacontrols.com/platforms/ios/controls/jstokenfield
(Also, CocoaControls is a great website!)

TITokenField is also a nice option:
https://github.com/thermogl/TITokenField

Related

Custom Switch - Yes No Type - iPhone

Is there any chance of getting this above switch implemented? Any reference source would be helpful.
You can create Custom switch button with the Help of image. Create a switch button (Set Alpha below to 1) and place a image above UISwitch it will work perfect.
https://github.com/samvermette/SVSegmentedControl
https://github.com/samsoffes/sstoolkit
https://github.com/alinux/iPhone-custom-switch-UIView
This isn't going to be an answer to solve your question, as it is going to be more of a piece of UX advice.
This type of switch goes against Apple's HIG.
You should never display a segmented control or switch where the user will not be able to tell when the control/switch is "On" or "Off". If I were someone who hadn't used switches in an iOS application before, I would not be able to tell what's "On" or "Off" in the image above. It may be easy for you to determine this, but you need to consider the possibility of someone (with less intuition than you) using your application.
Hope this helps.
Take a look at this replacement UISwitch project.

Conditionally color portion of the text of the UITextField

I've a UITextField, I need to color some specific word in a gray
Is there a direct solution?
If not, I think If I got the Source code for setTextColor method, try to conditinoally change its implementation (may be through a Category or even subclassing).
It's not possible as is. To implement that kind of feature you have to use CoreText.
For more info read this great tutorial: http://www.cocoanetics.com/2011/01/befriending-core-text/

Providing un-intrusive messages on an iPhone

This is kind of a silly question, but I cannot find the answer as I don't know the terms with which to search for it.
I am looking for a simple way of giving a 'status' message like 'Data updated' to the user without necessarily interrupting what he/she is doing (but have a option I guess in some instances to tab it an perform an action).
For example; some Apps give a rounded square semi-transparent with 'Lock screen/rotation' when an iPhone is rotated, I am look for something similar (or like the square box 'Build Complete in Xcode 4').
Is there an easy way of doing this?
Thanks a million in advance!
https://github.com/myell0w/MTStatusBarOverlay
MTStatusBarOverlay adds very subtle text to the phone's status bar. If you're looking for something a little more noticiable, try:
https://github.com/jdg/MBProgressHUD
As #kubi has pointed out, MTStatusBarOverlay is a good one, and I've passed Apple reviewer inspection with it. However I just found something that looks fraking awesome...
Tweetbot-Like Alert Panels (Blog), and the repository is MKInfoPanelDemo at Github.
Create a view that shows your message nicely, add it to the window, and start a UIView animation which makes it fade away. In the animation ended handler (delegate or block) remove the view.

How to change selected text color?

I'm using UITextView, and I need to change color(or background) of selected text, is it posible and how to implement it?
Thx to all, I've understood that it was bad idea.
Take a look at OHAttributedLabel. You will find it here. It basically allows you to format only parts of a label.
Thanks Joseph for mentionning my OHAttributedLabel class/work :)
Hope that helped !
Anyway, since the date of your answer, I did some improvements to my class and fixed some stuff in the code, so don't forget to update / pull from the github repo!
PS: (Sorry for posting a new answer, can't add a comment to an existing answer yet on SO as I just signed in)

How to Create the Highlight/Note Popup Buttons from the iPhone Kindle

I am wondering how Amazon did the highlight/note popup buttons in the Kindle app. After reading about UIPasteboard, UIMenuController, UIResponder, and UIResponderStandardEditActions, I am able to turn on or off standard edit actions (i.e. copy, cut, paste, select, and selectAll). However I haven't found a way to add a custom action yet. I would really appreciate it if I could get a pointer.
Thanks in advance!
Chris
(source: sampletheweb.com)
Edited by balexandre (added image instead link)
It looks like Amazon implemented their own custom view that mimicked the appearance of UIMenuController. I believe they did this rather than use SPI because if you click and hold on the Highlight cell, the arrow does not highlight, when it does in the real UIMenuController.
I don’t think there is a public interface to these controls, you’d probably have to code them yourself. (Or maybe figure out the private API, but that’s a slippery slope.) I am not sure about that, though, maybe somebody will prove me wrong.
That's a good point about the arrow part of the Notes/Highlight popup menu not highlighting, so they must be implementing their own.
However they are also obviously using a UIWebView, because it's recognizing tap and hold and they can highlight the text, and you can't get touch events from a UIWebView, much less get the information about what's selected. So how are they doing that?
This would be very useful for us to be able to do as well.
Use DTMenuController http://www.drobnik.com/touch/2010/01/dr-touchs-parts-store/
Costs 100 EUR ^_^
Custom menu items can be added via the UIMenuController's menuItems property. See Apple's UIMenuController docs.
the javascript part can be managed with jQuery, that's a fair simple and powerful library. i'm using it for resizing and rearranging things in a webview and it works great :)