I am able to change the custom keyboard height but when i am changing the keyboard height first it setting to default keyboard height and jumping back to the given height.
please help me out in this.
Per the docs: "In iOS 8.0, you can adjust a custom keyboard’s height any time after its primary view initially draws on screen." It is impossible to solve the jumping issue.
You need to change the height in the viewWillAppear of your keyboard (the one you are inheriting from UIInputViewController).
Related
Size of MDCFilledTextField/MDCOutlinedTextField is not changeable and it's fixed.
Any idea to change Material TextFields height?
FYI: I tested some ways like putting the textField in a view ...et cetera. non of them works.
Changing the font size changes the height!
I've a VC with few views above textfield and a button below text view contained inside scroll view. I'm trying to move textview up when keyboard is shown but I can't get it working correctly.
Textview height <=100 in IB. I'm adjusting textview height as we type in it up to max 120 then it scrolls.
I've read it and tried most of solution provided on Move textfield when keyboard appears swift
The problem I'm facing is bottom constraints, if I set it then my textview stretches in height when it loads and then it breaks textview height adjustment during typing. And I can't find any working solution without setting bottom constraints.
Can anyone give me some pointers on how to fix this issue?
Add fixed text view height and set bottom constraints to greater than or equal to.
I have a view in my storyboard with some items, 1 of which is a UITextView. Whenever I enable scrolling (either by inspector or via code), the UITextView disappears/becomes invisible/whatever. Is there a way to make this not happen?
Thanks in advance
The height of UITextView is probably not set. When scrolling is disabled, the UITextView's size is calculated based on it's content (because the content has to fit, because if it doesn't, user can't scroll to see it). On the other hand, when the scrolling is enabled, the system presumes, that even if the content doesn't fit, user can scoll down to see it all. And since the UITextView height is not set by you, and neither it is set "by the content", the UITextView height is 0.
i'm back developing IOS after a year and a half. I'm really having difficulty in make use of UIScrollView and auto layout.
I'm developing an application running just in Iphone and portrait orientation.
I have a simple form inside my content view...
label
textField
textField
textField
textField
button
textField
view
imageView
label
The problem is with the width of the contentView's content. The size is been defined for the labels. I would like (And really have to do) o size it according with the screen size.
Here is my constraints of my first text field:
Here is my simulator screen running the app:
how I mentioned before, it seems to get the size according the label and not according the screen size. If I create a constraint of size for the first label, this size change but I would like to get the size dinamically based on screen.
I didn't write any code, I want to do it preferentially using auto layout to understand the concepts of auto layout better.
If someone could help me to solve it... I would be very grateful.
Pin your contentView.width equal to scrollview.width.
Add a constraint to your scroll view's content view child to be the same width as the root-level view.
I am having a very frustrating issue. I know there are all kinds of issues with UIScrollView in iOS7 and XCode 5. I need to implement a scrollview and there are all kinds of tutorials showing you how to do it by switching off auto layout but that then messes with the rest of the views in my app.
I tried the fix of putting my subviews into a container UIView and placing that in the UIScrollView and setting the scrollview's content size to the size of the contained UIVIew. That didn't work. Now I am working with placing everything in the scrollview and it all works with one exception. When I load the view on the simulator or a device the content view is moved down but somewhere around 60 points or so. See image below.
That white space below the title bar on the right is still the scroll view as I can press and drag within it. Adjusting the contentOffset doesn't do any good as that just scrolls the view down slightly. I have no idea what to do here.
Just a little more info: I setup the scrollview and all the subviews in storyboard and the connected them up. Not sure if that has any bearing on it.
Thanks in advance for any help you can provide.
I think your Scrollview top space constraint have 64 pixels. That's a problem. So, set your top space constraint value to 0.
You need to add the constraints before view displayed then contentsize will be set automatically.
Check UIScrollView's autoresizing mask. It has to be set like this.