Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to extend keyboard gradient on iPhone?
    primarykey
    data
    text
    <p>I see that few apps are extending keyboard but I would like to know how they do it.</p> <p>Here are 2 examples.</p> <p><a href="http://www.textasticapp.com/images/screenshot_iphone5.png" rel="nofollow noreferrer">Textastic</a> &amp; <a href="https://pbs.twimg.com/media/A6SCZlXCAAETFJu.png:large" rel="nofollow noreferrer">Prompt</a></p> <p>Now I know that I can add inputAccessoryView to UITextView but it still has small thin line that separates keyboard from UIToolbar like on image bellow.</p> <p><img src="https://i.stack.imgur.com/oZRK9.png" alt="enter image description here"></p> <p>How they do it? Extending UIWindow that holds keyboard or in some other way?</p> <p>Update 1 with answer:</p> <p>So I have used solution that Tyraz wrote.</p> <ol> <li>Subclass UIToolbar</li> <li>Instead of image I have used UIView with background color same as the finishing color of the keyboard gradient and with UIViewAutoResizingMaskFlexibleWidth so that it covers keyboard when rotated, with height of 3 pixels</li> </ol> <p>Here is the code for the subclassed UIToolbar</p> <pre><code>- (void)didMoveToSuperview { [self.separatorHideView removeFromSuperview]; CGRect seperatorRect = CGRectMake(self.frame.origin.x, self.frame.size.height, self.frame.size.width, 3.0); self.separatorHideView = [[UIView alloc]]; self.separatorHideView.backgroundColor = [UIColor colorWithRed:0.569 green:0.600 blue:0.643 alpha:1.000]; self.separatorHideView.autoresizingMask = UIViewAutoresizingFlexibleWidth; [self addSubview:self.separatorHideView]; } </code></pre> <p>Update 2: Here is code how I'm adding it to UITextView and what color I'm using for tint.</p> <p>I'm adding it to the UITextView in viewDidLoad with following code</p> <pre><code> CustomToolbar *accessoryToolbar = [[CustomToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 38)]; accessoryToolbar.tintColor = [UIColor colorWithRed:0.569 green:0.600 blue:0.643 alpha:1.000]; editor.inputAccessoryView = accessoryToolbar; </code></pre> <p>And this is how it looks like with solution applied to it</p> <p><img src="https://i.stack.imgur.com/ECxg7.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload