Have been searching around and can't find the answer to this. I'm just wondering how to change the color of the font for each individual line of a picker. Is this even possible? Thanks
Yes it's possible. Here are a few links to get you started:
UIPicker font size for a certain column and row
http://alisothegeek.com/2009/07/custom-uipickerview-text-formatting/
https://developer.apple.com/library/ios/#documentation/uikit/reference/UIPickerViewDelegate_Protocol/Reference/UIPickerViewDelegate.html#//apple_ref/occ/intf/UIPickerViewDelegate
Related
friends!
I want to make a number picker on Flutter, where the font size of numbers (not selected) progressively decreases to each side and changes the colors.
As shown in the picture.
Is anybody has a task like that? Any solution?
p.s. Tried to use package NumberPicker
No results!
i never used NumberPicker, but here is
https://pub.dev/documentation/numberpicker/latest/numberpicker/NumberPicker-class.html
decoration properties which help to change selected value size and color.
I have a few UITextFields and I would like the user to be able to change the font's appearance within those fields.
Right now I have a UIToolbar with 5 buttons used for font controls. One for font name, one for size, one for color and one for alignment.
To change font, I display a picker with the fonts family names, letting the user pick default font for that family.
For the font color, I display another toolbar with a font size slider
For font color, I display an open source color picker
For font alignment, I display a button that cycles through the left/center/right alignment.
Finally there's a close button that hides the toolbar.
Currently all of my code is in one controller, but I would like to have it refactored into a separate, reusable class.
Since I'll be rewriting code, are there any open source font controls like I'm describing above? Maybe I can just plug in something that's already made into my project?
Thank you!
It wouldn't be very hard at all. Instead of pickers use a scroll view with buttons and labels above them using the font. As for size you could do the same!
This would be easy in Xcode 4, not so sure in 3.X.X
I found that the attributed string example by apple does have a table view-like font controller that includes a preview of what fonts look like. I think extending that controller may be the easiest thing to do:
http://developer.apple.com/library/ios/#samplecode/CoreTextPageViewer/Introduction/Intro.html
I'd like to offer a user of my app the ability to highlight or change color of selected words within a UITextView. I know how to change the entire text color:
textView.textColor = [UIColor redColor];
This is not what I'm looking for. I need to know how to change color of arbitrary sequences of characters within a UITextView. I have not seen such feature in the text views up to date, so I think it's not supported out of the box. Are there any open source projects or examples on how to change color or highlight blocks of text within a UITextView?
Thank you!
You can create CATextLayer and assign NSAttributed string to it. Have a look at here. You can make use of DTCoreText
is there a way where we can change the color of the first text in UITextView and the rest of the text will in default color which is black
If you are asking if you can change the color of a word or sentence of a UITextView but not the entire content, the answer is no unfortunately.
Check this answer here, Change font of individual words in UITextView in Interface Builder
It is possible to use a UIWebView to render the text in the manner you are asking. You could also draw it yourself using CoreText, but that would be quite a pain.
Hope this helps,
Matt
I cannot find how to a text field group, similar to what is in the Address Book app:
(source: puc.edu)
Can someone tell me what I am doing wrong? I can't find an option to make them look this way.
Also, does anyone know the font, font size and color?
As Devin mentioned it is just a UITableView with it's style set to Grouped. Then each cell contains a UITextField. They probably also worked their magic so when you click "Next" in the first cell, it automatically assigns the second cell as a first responder, which then moves the cursor down instead of putting the keyboard away.
This is a Table with the style set to "grouped".
Here's a reference: http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/TableView_iPhone/AboutTableViewsiPhone/AboutTableViewsiPhone.html