Algolia voice-overlay-ios change titleListening - ios

I want to change "listening..." text of inputScreen:
voiceOverlayController.settings.layout.inputScreen.titleListening = "Another text for listening..."
but this doesn't help.

Be sure to add your code for changing the UI in the appropriate lifecycle of the ViewController. I have the following appear correctly when the code is under viewDidAppear(:_):
voiceOverlayController.settings.layout.inputScreen.titleListening = "Voice-search is not enabled."

Related

Changing the appearance of form with code

You can change the appearance of your form by selecting the "Project" tab, then "Options", then "Appearance".
Is there any way that I can change this with code, while the program is running? And if so, how?
You just need to add/select the required styles from "Appearance" and get those selected styles from TStyleManager.StyleNames. Follow this brief tutorial which shows how to do it.

How to remove "border-radius" from default UITextField?

My question is, how do I remove the "border-radius" of the textfield in Swift? Is it achievable in xCode or do you need to do a customized textfield? If so, how do I do that? I want the default textfield but without it's "border-radius" if you know what I mean.
Help, please!
UITextField has an attribute borderStyle, which can be changed either in interface builder:
...or in code:
public var borderStyle: UITextBorderStyle // default is UITextBorderStyleNone. If set to UITextBorderStyleRoundedRect, custom background images are ignored.
You can set the border style using Storyboards.
And also you can set border style programitically
[txtUserName setBorderStyle:UITextBorderStyleNone];
What do you exactly mean with border-radius? the border around it?
You can turn that off by clicking the button in xcode:
Or if you want to do it programmatically do:
myButton.bordered = false

textView loses style in iOS after populated

I may have found a bug in iOS and I'm not sure how to overcome it. I am losing my textView style as soon as the database populates it with content.
That is what happens:
In my storyboard I have the following textView
As soon as I populate the textView manually or from my object as per below it loses its style.
if let object = currentObject.objectForKey("postText") as? String {
postTextView.text = "the text field has some text added"
}
On simulator, showing the style is lost.
Also, other situation:
I may lose the style as well if I uncheck the editable box as per the image bellow.
Here's an older answer which hopefully answers your question and solves your problem. Is seems indeed to be a bug. https://stackoverflow.com/a/19115950/543224
Did you set the attributes on the text view itself (i.e. the text view text is "plain", and not "attributed")? Or did you use attributed text?
If the latter, it's quite normal that if you replace the attributed text with plain text with no attributes, it reverts to the attributes of the text view itself.
Make sure the type is set to "plain", and that you set the attributes on the text view itself, not on the text inside it. Or use the attributedText and not the text property of your text view, with appropriate attributes.
I guess that you update UI on from background. If you want update UI you have to update in main queue. If you don't do it, some strange issue will come. So you can change your code to:
dispatch_async(dispatch_get_main_queue()) { () -> Void in
if let object = currentObject.objectForKey("postText") as? String {
postTextView.text = "the text field has some text added"
}
}

XLForm formValidationErrors for fields with no title displays "(null)"

Right now, for rows without title, "(null)" will be used in the alert for formValidationErrors
Is there a way to
1. hide the title of the row if I set it? OR
2. Make the alert search for the placeholder when title is absent?
It does make sense to use the placeholder in place of the title, since the rows look nicer using placeholders rather than titles.
Any help or suggestion is greatly appreciated! =D
Set row.requireMsg to the text you would like to be displayed in the alert for formValidationErrors
You can override -(XLFormValidationStatus *) doValidation in XLFormRowDescriptor
and set message to returned XLFormValidationStatus;
You can override -(NSArray *)formValidationErrors in XLFormViewController, first NSError description returned is displayed.
You can override -(void)showFormValidationError:(NSError *)error in XLFormViewController and display UIAlertView on your own.
I do not use it yet (considering currently) but this is how I see it from source code...
i think you can do these steps
Go To your XLForm.m file where your define rows and colums.
See where you don't give the title to row if you don't want to give title just assign this line not empty.
row = [XLFormRowDescriptor formRowDescriptorWithTag:#"nil)" rowType:XLFormRowDescriptorTypeText title:#""];
i think that is helpful.

Changing the color of FPPopover controller

I have Downloaded FPPopover controller code form Link
it consist the some popover colors as green,red,yellow,light gray..
But in that code i am not able to change the popover color as real popover color as in iPad
Please go through the code in the above Link and help me...
Thanks..
hey its simple you just need to change value here in this example
FPPopoverView.h
typedef enum {
FPPopoverBlackTint,
FPPopoverLightGrayTint,
FPPopoverGreenTint,
FPPopoverRedTint,
FPPopoverDefaultTint = FPPopoverRedTint
} FPPopoverTint;
you can check change with FPPopoverDefaultTint = FPPopoverRedTint with FPPopoverDefaultTint = FPPopoverLightGrayTint
i just tested and i put FPPopoverRedTint
Output is

Resources