Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7769951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:17:12+00:00 2026-06-01T16:17:12+00:00

here is my code: -(void)setViewMovedUp:(BOOL)movedUp { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.2]; // if you

  • 0

here is my code:

-(void)setViewMovedUp:(BOOL)movedUp
{
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:0.2]; // if you want to slide up the view
    [UIView setAnimationBeginsFromCurrentState:YES];

    CGRect rect = scroll.frame;
    if (movedUp)
    {
        rect.size.height += kOFFSET_FOR_KEYBOARD;
        rect.origin.y -= kOFFSET_FOR_KEYBOARD;
    }
    else
    {
        rect.size.height -= kOFFSET_FOR_KEYBOARD;
        rect.origin.y += kOFFSET_FOR_KEYBOARD;


    }
    scroll.frame = rect; 
    [UIView commitAnimations];
}


- (void)keyboardWillHide:(NSNotification *)notif {
    [self setViewMovedUp:NO];
}


- (void)keyboardWillShow:(NSNotification *)notif{
    [self setViewMovedUp:YES];
}

- (void)viewWillAppear:(BOOL)animated
{
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) 
                                                 name:UIKeyboardWillShowNotification object:self.view.window];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) 
                                                 name:UIKeyboardWillHideNotification object:self.view.window];
}

- (void)viewWillDisappear:(BOOL)animated
{
    // unregister for keyboard notifications while not visible.
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil];
}

The problem is, how can I spezify this to only work on TextView3, not TextView2 or TextView1.
BackGround is, that TextView1 and TextView2 are doesn’t need that becouse there are on top of my view.
Only TextView3 is the TextView that is not readable because the keyboard is overlayed and the view must be corrected to be able to read what I write.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:17:14+00:00Added an answer on June 1, 2026 at 4:17 pm

    assign a special tag for textView3 implement the TextView delegate mothode – (void)textViewDidBeginEditing:(UITextView *)textView; here you will check for the textView tag if its equal to textView 3 tag call your function -(void)setViewMovedUp:(BOOL)movedUp .

    More code :

    Ok you need to import the TextViewDelegate into your viewController like this : in .h viewController file -> viewController : UIViewController<UITextVIewDelegate>

    Then in viewDidload for ex assign the tag like this : textView3.tag = 222;

    Then take the delegate methode that i write it above “textViewDidBeginEdit” and inside make an if statment to check textView tag if equal to 222 call your function .

    This the best i can describe right now because im writing this from iPhone … Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my code: partial void OnisApprovedChanging(bool value) { this.dateApproved = DateTime.Now; } 'dateApproved'
I have UiTextView where I want change font size (increase), here code -(void)biggerFont:(UIBarButtonItem *)
Here is my code: void reverseStr(char *str) { if (str == NULL) return; int
Here is my code: - (void)loadView { //hard coded array of content for each
Here is my code: void subroutine(const char *message) { printf(message); } And here is
i can't set title to Action bar sherlock. Here is my code: public void
Here's the code in AlertTableView: - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ NSInteger index = 12345; NSLog(@AlertTableView:
Here is my code : public static void main(String[] args) { // System.setProperty( //
Here’s my code behind: protected void gvviewapproval_RowUpdated(object sender, GridViewUpdatedEventArgs e) { using (SqlConnection cn
I have a problem with this code right here: - (void)fetchedData:(NSData *)responseData { //parse

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.