These days I looked atIOS 7 UI Transition Guide and found an input box made with system Uitextfield,
I don't know if you notice the UI of the high-D map navigation in the system ... Then it's the beginning of the story ~ t_t ~
Uitextfield text in the input box is composed of two parts, the left is the default hint text, the right is
The part of the user input, and the response part of Uitextfield is after the ":", the first reaction is to use the picture
Do the background map, and then the right of the text part of the blanks, or to mediate the input of the text display location, as everyone knows
There is a leftview in the property, there is also Rightview, and you can specify its display mode--leftviewmode
Put a code on it:
UILabel *leftlabel = [[UILabel alloc] Initwithframe:cgrectmake (0, 0, $)]; Leftlabel.backgroundcolor = [Uicolor clearcolor]; Leftlabel.textcolor = [Uicolor lightgraycolor]; Leftlabel.text = @ "Start:"; Uitextfield *xtextfield = [[Uitextfield alloc] Initwithframe:cgrectmake ([[]]; Xtextfield.borderstyle = Uitextborderstyleroundedrect; Xtextfield.contentverticalalignment = Uicontrolcontentverticalalignmentcenter; Xtextfield.leftview = LBL; Xtextfield.leftviewmode = uitextfieldviewmodealways; Xtextfield.adjustsfontsizetofitwidth = YES;
Another powerful attribute of Uitextfield is that Adjustsfontsizetofitwidth is based on the content
Size automatic resizing, really hanging days ~ ~
Then you will see a nsattributedstring *attributedtext this attribute, often seen, and no details
Know its usage, in the picture and text mix and so often see to use similar settings font, font color, shadow, etc., good strong appearance
The code that was stolen in the text Kit tutorial
And then what's the key to this type of dictionary processing property?
Find some common key for everyone to refer to
NSString *Const*const*const*Const Uitextattributetextshadowoffset, sets the translation amount of the Titlewz shadow;
How can this be enough, and then according to the Nsforegroundcolorattributename attribute in the stolen code, finally
Find the source, hahaha, ~~~~~ basic in the NSAttributedString.h header file declared, should have found Ah,
[IOS] Uitextfield properties that are often overlooked