How to disable react-native-datetimepicker in ios? - ios

I am using react-native-datetimepicker (#react-native-community/datetimepicker) for my android/ios app. I need to disable user from changing the date for some occasions.
In android since picker is only modal, anyway I have to show a label with date and I can disable user with onPress method logic.
But in ios a default label is given from the picker component and I need to disable it. I found following discussion on disabling the underlying ios component - Disable / Enable UIDatepicker
I need to disable ios picker from react-native-datetimepicker/datetimepicker library.

Related

How do I automatically switch to the iOS custom keyboard when entering my app?

I would like when entering my app to automatically switch to my custom keyboard like the Facemoji app.
Is this possible to force user to open only custom keyboard without going into setting option. I want whenever user opens the app. only custom keyboard should open, not other. In my app there is preview function, show as extended keyboard otherwise it will show default keyboard i will fail.
thanks!
UITextField have property inputView
You can set any view you want inside yours application.
So you can use use the same view used for your's custom keyboard

Xamarin Forms Picker on IOS

I'm using Xamarin Forms picker Control, When the control shows up on Android Device, it has 2 buttons on it the "OK" and "Cancel", on IOS however i Get only the "Done" button, it causes the user to be unable to perform cancel operation to discard its new selection and forces him to scroll back to the original selection, is there is a way to have this button? or some workaround for it?
No, and it's unfortunate because there's nothing inherent to iOS itself that prevents it. In fact many applications allow you to cancel your pick selection.
It's just one of those Xamarin quirks.
You can use
iOSSpecific:Picker.UpdateMode="WhenFinished"
so that the picker value only gets set when the user presses the Done button - Not quite what you asked but as an alternative its not too bad.
You need this name space
xmlns:iOSSpecific="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
and use in your picker like this
<Picker ItemsSource="{Binding Options}"
SelectedItem="{Binding Result}"
ItemDisplayBinding="{Binding Label}"
iOSSpecific:Picker.UpdateMode="WhenFinished" />

Swift: How can I change the color of keyboard background and lettering?

I am building a project for iOS8 in swift. The default and dark options for keyboard in xcode do not go with the color theme for my app design.
Is there a simple way for to change the colors in the keybaord?
The short answer is no you can't change the look and feel of the system keyboard. Even if you did many people don't even use the default keyboards.
With iOS 8 apple introduced custom keyboard extension.
A custom keyboard replaces the system keyboard for users who want
capabilities such as a novel text input method or the ability to enter
text in a language not otherwise supported in iOS. The essential
function of a custom keyboard is simple: Respond to taps, gestures, or
other input events and provide text, in the form of an unattributed
NSString object, at the text insertion point of the current text input
object.
And here's some useful tutorials about how to create custom keyboard :
http://www.appdesignvault.com/ios-8-custom-keyboard-extension/
https://www.weheartswift.com/make-custom-keyboard-ios-8-using-swift/

UIWebView DatePicker Input Detection

I have a UIWebView and I'd like to use the internal datepicker on iOS that is used when I have the <input type=date> tag.
I have some UIViews in iOS that I want to modify based on if that input changes.
How do I detect this change? I'm hoping there is a delegate I can use but based on my research, that doesn't seem possible.
If I understand you correctly, you want to catch datepicker value changed event? If it is, you can simply create IBAction method and connect it to datepicker valueChanged event in interface builder.
This may can help you
Invoke native date picker from web-app on iOS/Android
There are some plugins that simulates the uidatepicker style in javascript.

How do I trap focus within a modal popup on iOS using the UIAccessibility protocol?

I am launching a custom popup when the user clicks a button on iOS. How do I make sure that the focus stays within the custom popup (for accessibility reasons) when using voiceover on the iPhone? Currently the focus lands on the elements in the parent container as I swipe right.
If you're targetting for iOS >= 5.0 then there is a property called accessibilityViewIsModal. Using this definitely solve your problem.
If you're targetting for iOS < 5.0 then there is no a straight way for this. You need to customize your view controller's view and reorder the "_accessibleElements" as shown here. See the section Make the Contents of Custom Container Views Accessible.

Resources