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 8754729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:41:40+00:00 2026-06-13T13:41:40+00:00

The given problem I have the following view that includes a Navigation Bar, Search

  • 0

The given problem

I have the following view that includes a Navigation Bar, Search Bar and table view – the left picture is the given view I have and the right one is what I want to achieve – basically just hide the navigation bar and resize everything.

given wanted

The current solution

Currently I’ve managed to hide and resize everything using a vertical-space constrain from the search box to the superview top property –

  • The default constraint constant is 44 (the navigation bar height)
  • After clicking the search box I hide the navigation bar and set the constraint constant to be 0
  • When I stop searching I restore the navigation bar and set the constraint to 44 again

vertical-constraint

What I want

I’m looking for the easiest way to hide the navigation bar and resize the search box + table to fill the whole screen.

Is there any way to do it and take advantage of the iOS 6 auto-layout system?

My current solution feels unnatural.

  • 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-13T13:41:41+00:00Added an answer on June 13, 2026 at 1:41 pm

    If that’s the only constraint you need to change, then you can create an IBOutlet for that one constraint into your view or view controller, then simply modify the constraint based on when you need it to change:

    if(shouldHide){
      self.nibTitleBarConstraint.constant = 0.f;
    }
    else{
      self.nibTitleBarConstraint.constant = 44.f;
    }
    

    If you’d like to animate the change, then simply stick -layoutIfNeeded in an animation context:

    [UIView animateWithDuration:0.33f
                     animations:^{
                       [view layoutIfNeeded];
                     }];
    

    This is applicable to any constraint’s constant you would like to modify (height, top space, etc.) so long as your other constraints know how to react with a change in that view’s constraints.

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

Sidebar

Related Questions

I have the following problem: I am given a tree with N apples, for
I have the following problem, given the following service contract, data contract, and service
Given the following problem , I'd appreciate for any corrections since I have no
I have a problem with nested templates and their template specialization. Given the following
Original Problem: I have 3 boxes each containing 200 coins, given that there is
I have a homework question that says: Problem 1: Given the array [ 22
I need a solution for the following problem: I will have a table in
Hey guys, I have a problem with the following table: CREATE TABLE [dbo].[CA]( [Id]
Please assist with MVVM design/understanding problem. Given that we have a Windows Phone app
I have the following problem. I have a tree view control in .NET and

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.