Question on uikeyboard - iphone

Is it possible to change the uikeyboard button size for my application.
I mean i want to make the ui keyboard button size bigger..
Is it possible? can i change that?
If so please guide me out

No. You cannot customize the button size on a UIKeyboard. (Although note that the keys become larger in landscape orientation.)
You could, in theory, write your own keyboard; however, you will almost certainly be unable to provide localizations for every language (including non-latin languages such as Japanese). As a result, your app will almost certainly be rejected from the App Store.

Related

Resize app automatically depending on screen size in swift

I just started making an app, and I have done a lot but I was not working with auto-layout. My whole app is in landscape mode, and I want it to work on all iPhone's. I now designed it for the iPhone 5, but when I open it on iPhone 6, there is a lot of whitespace. Is there a button to automatically resize everything? Or must I add auto layout and do every designing bit again?
Unfortunately you're probably going to have to layout everything again with auto-layout. A way to expedite your process would be converting the storyboard to auto-layout and then selecting "Reset to Suggested Constraints". You can access this option by pressing the small triangle icon in the bottom left.
Despite this, you probably will need to update a lot of the constraints manually. But this should give you a step in the right direction.
Have you tried Size Classes? Or Stack Views?
Size classes:
Apple documentation # https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/Size-ClassSpecificLayout.html
Apple documentation on Stack Views #
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/LayoutUsingStackViews.html#//apple_ref/doc/uid/TP40010853-CH11-SW1
A good tutorial on "Stack Views":
https://www.raywenderlich.com/114552/uistackview-tutorial-introducing-stack-views

How to replace the default font for the whole OS

Is there a way to make my app override the current font of the currently foreground application?
What I have in mind is no matter which app is on foreground my app to be able to attach a button to the keyboard which will switch the font to a custom one thus overriding the current font for all ui elements(labels, buttons, text fields etc.).
What you're looking for is not allowed by Apple.
It seems it can be done for jailbroken devices though. It's difficult to tell how exactly they're doing it but I guess they meddled around with the images/colors provided by Apple for the keyboard and replaced them with their custom ones leaving the default un-recoverable.
Here's a blog about it too.
You can create a category on UIFont and replace systemFontWithName:size: and boldSystemFontWithName:size: with your own font. But this may have some weird side effects, as even alertViews and actionSheets are customized with that method..
edit: of course this works only in your own app.. you cannot change anything outside of your app.

iPhone keyboard return key

I need to customize the iphone keyboard. How can I do it? Also it is needed to place the return key of the keyboard with my project logo. How is it possible?
You cannot customize the apple iOS's default keyboard.
As such you can create a custom control similar to apple iOS's keyboard and make it look and customize as you want but then there ar more chances than not that your app may be rejected when you try to submit your app on the Apple's app store.
So it is not preferable to create custom keyboard.
Hope this helps you.
What have we done in one of our apps and you can do is create custom uibutton that is same size as return key, then register for UIKeyboardWillShowNotification and UIKeyboardWillHideNotification.
when one of those fire you should add/remove that uibutton to window with animation that tracks keyboard showing/hiding animation...
Ugly way to do it, but it served its purpose...
Some of the tutorials are incomplete or are much older. This tutorial works from IOS 4.3 onwards and I checked it. Save the two image graphics, and paste in the code. There is very little to change. Here is the link.
ps. I am not affiliated in any way with this article, but found it to be complete.
http://www.neoos.ch/blog/37-uikeyboardtypenumberpad-and-the-missing-return-key

iphone custom datepicker

Is there any datepicker UI elements that I can use on my iphone application? Native one is found to be too big.
Maybe the right question is why is it too big? Apple has done a pretty good job of making a set of controls that apply for most circumstances, look stylish, and are usable by the user.
The default control is the size of the iPhone keyboard, and it was made this way for a very good reason: all elements are easily viewable and selectable by touch. If you have a lot of UI elements making life difficult, consider displaying the selected date/time in a label and edit it in a modal dialog.

Iphone default behaviors that need to be implemented?

When I've learned that I have to write some code to make the iphone keyboard go away. I was quite surprised. I was surprised even more when it become apperent that it is just the top of the iceberg.
What are the expected UI behaviors that aren't provided by system OOTB?
Is the list below complete?
The expected UI behaviors:
Focusing next text field when [done] is hit
Hiding the keyboard when background is hit
Using Touch Up Inside to fire a button action. (To give user opportunity to change his/her mind)
Supporting the screen rotation.
Some of that is silly, but some of it has uses as well.
Focusing next text field when [done] is hit
Which field is "next"? If you have a large form with fields both next to and above/below each other, next might not be so obvious. Even if they are in some linear layout, the iPhone would have to work to figure out which one is next. Do you want to wrap around at the end of the form, or dismiss the keyboard, or submit the form?
Hiding the keyboard when background is hit
I mostly agree with you here, though there are a few cases where this is useless. For example, adding a new phone number in the contact app.
Using Touch Up Inside to fire a button action
This one I really don't get. I can only guess that it's designed to allow you to use buttons instead of the touchesBegan/Moved/Ended methods. I guess it could be useful, but I've never used anything but Touch Up Inside.
Supporting the screen rotation
Many apps just don't work in any other orientation, such as games. If you want to use rotation, you only have to add two lines of code assuming you've done your layout well.
I hope this helps explain some of the strangeness. Aside from the keyboard dismissal, I've never really found anything too annoying. The one thing I wish they supported was using the highlight state of UIButtons for the set state. It would be a quick and easy toggle button, but I've taken to screenshotting a highlighted button and using that for the background image of a selected button.
Want a rounded rectangular button that isn't white? Since that one uses a background image, you can't just click something somewhere that makes it the color of your choice. You have to create your own image or you could even use CSS (WTF!?) to do it.
Unfortunately, the iPhone SDK lacks a lot of helpful things one would think would just be there. However, many people have taken the time to write wrappers for many of these kinds of things to help facilitate development - a quick google search into the functionality you are expecting may turn up a lot of useful answers!
For example, you could make the keyboard go away when you tap outside of it by creating a new view when it appears, and placing that view behind any user-interactable views on the screen. When that new view is tapped, it will become first responder and cause the keyboard to slide away (because the UITextField is no longer first responder).
Such a thing could be easily implemented as a drop-in fix for pretty much anything you'd need it for with very little code.
Still should have been included in the SDK in the first place, though!