SwiftUI TextField customisation in WatchOS for removing emoji option - textfield

I am trying to add a text input field using SwiftUI TextField in watchOs 6.1.
I am getting following three options for providing inputs. i.e. Voice recorder, scribble pad and emoji option as shown in screen shot.
I need only voice recorder option alone. How to remove the scribble pad and emoji option from TextField?

Related

How to make customized keyboard in react-native?

I am making an app. To access this app I need to create an app pin.
I have to make a customized keyboard, so when I press keys on keyboard, text (pin) should be filled in these 4 circles (for this I am using react-native-confirmation-code-input library).
I have used many customized keyboard libraries but none worked out.
If I make this keyboard without using any library, then I get stuck.
I am not able to make focus on second textinput when first textinput finish its text editing .
This is the image of the layout I need for my app:

Add Stickers in Custom KeyBoard Extension

I am looking to create a Custom Keyboard for iPhone,iPad. I have successfully integrated Phrases and Emoticons into the Keyboard, But couldn't get any idea how to add stickers in the keyboard.
Anyone knows how to add ?
Thanks.
I recently created a custom keyboard for sending stickers on iPhone. I noticed this question is tagged as Objective-C but I will be responding in Swift since that’s how I did it.
If I am understanding your question correctly, “add stickers in the keyboard” may refer to stickers similar to those on Facebook Messenger or Peach. My personal inspiration came from wanting to create something similar to Kim Kardashian’s KIMOJI app. This custom keyboard extension works by allowing the user to tap on a sticker, copy it, and then paste it into an input field to send.
To begin with, I found this great custom keyboard tutorial on AppCoda: Creating a Custom Keyboard Using iOS 8 App Extension (written in Swift). The tutorial walks you through how to create a new keyboard extension within an app, add a view which holds buttons (or keys), and apply appropriate constraints. However, I found all the details of creating keys less necessary for a sticker keyboard.
Following the tutorial, once you create a basic keyboard with a KeyboardViewController and KeyboardView xib, I added UIButtons. In my case, I added six buttons to correspond to six stickers. The first UIView row and second UIView row both held three buttons each. I applied constraints so that each button was equal height and width (approximately 100 x 100). In Storyboard, I clicked on each button and in the attributes inspector I set the button “image” property to the corresponding sticker image I had in my assets. Also, to determine an appropriate height for my keyboard, I found this helpful resource: iPhone Development 101 - iPhone & iPad Keyboard Sizes.
Note: In order to create stickers you need images of some sort. I drew / designed my own. You could also design them using Adobe Illustrator or an equivalent program.
Once you set the images for each button and run the app, the images may not appear. To fix this, I had to visit my sticker keyboard Target > Build Phases > Copy Bundle Resources to ensure Assets.xcassets was included. Running the app again, the images appeared.
Next, assuming you have created a KeyboardViewController that corresponds to your KeyboardView.xib, you can create a corresponding #IBAction for each button/sticker in the view controller. We want the user to copy the sticker selected to Pasteboard so they can send the stickers. To enable your custom keyboard to access Pasteboard, go into the keyboard extension’s Info.plist file. Under Information Property List > NSExtension > NSExtensionAttributes, change the RequestsOpenAccess property to YES.
Now, the IBAction method you created can assign the appropriate sticker image path to the Pasteboard! This is very generally how my code looked:
#IBAction func stickerPressed(sender: UIButton) {
let image = UIImage(named: "sticker")
UIPasteboard.generalPasteboard().image = image
}
When you run and test your app on a device and install it, click the globe icon on the keyboard to switch to your custom keyboard. Tap on a button/sticker, then tap in an input field to paste. In Facebook Messenger, options may appear to “Send Photo” “Edit” or “Cancel.” In Peach or Messages, it will send inline. It just depends on the app.
This process worked for me and I hope it can help someone else out there!
You can create UIImageView inside UICollectionView or UITableView, and show sticker images inside these UIImageViews. And when user taps on them, just get the UIImage present in that view.

how to align text center in nsMenuItem Cocoa Mac osx

I am new in MAC OS X development, I have to align text centre in nsMenuItem but I not find any particular solution. I checked on google but not find any tutorial.
Find some tutorial but not exactly same, in these tutorial we take a NSView in nsMenuItem and then Insert subview in NSVIEW to accomplish it centre align.
Is there is any better solution? Please provide me link if possible.
Edit : I attached screen shot, but this is not working for me.
Thanks
You can set the Attributed String of the menu item, which does allow you to center the text, as well as change the font, color and size of the text as well.
I do not know which version of Xcode/OSX you are using, but under Xcode 5.0.2 you can use the built-in interface builder to edit the attributed strings of menu items.
Click the MainMenu.xib entry, then click the menu you want to edit to open it, then click the menu entry. On the right side of the window there should be some options, if not click the right most square in the group of 3 at the top right of the Xcode window 1.
Once you have the right panel open click the Attributes Inspector icon [2] (4th from the left, looks like a slider type icon). At the bottom of the list of attributes you will see an entry for "Attrib. Title" [3].
That is where you can set a custom font, color and alignment for your menu item.
If you need more control then that provides, you can also embed custom NSViews into your menus which gives you complete control over how the menu will look.

Fix dot issue on TextField in Titanium

I am working on titanium application.When I have written text and press space button twice then dot is showing on Textfield and TextArea.Please suggest me how to fix it.I have attached the screen shot.
This is a feature on your phone, has nothing to do with Titanium. Go to Settings -> General -> Keyboard and turn off "." Shortcut

Split keyboard like iMessage app on iPad

I am trying to have the same style of split keyboard like the iMessage app on the iPad. If you split the keyboard, it seems like the two keyboards are still connected to each other. This is different when I split the keyboard in YouTube app.
Also, the input field is right above the split keyboard on the right. In addition, if you drag the split keyboard up and down, the input field also moves along with the split keyboard. Is Apple using it's own custom keyboard?
Thanks.
Look at UITextView Class Reference, specifically the inputAccessoryView.
When you set an input accessory view to your text view (or UITextField) it will be attached to the keyboard, just as you described
Other example of it is safari's search field.
The trick in iMessages in the iPad is that the input accessory view is aligned to the right which is not a problem, you can have a big transparent inputAccessoryView containing the right aligned and visible view :)