UISearchBar prompt appears ON the bar, not at top of it











up vote
1
down vote

favorite












I do not know if this is a known or unknown bug, but in my case, the prompt label appears ON the bar, not at the top of the bar, like the following:



enter image description here



It is the default search bar, dragged and dropped into a view and its constraints are set as they should be. As you can see only its placeholder and prompt attributes are changed.



The problem occurs with iOS 12.1 (both simulator and device) and Xcode 10.1
I was not able to find anything about it. I have to use that prompt thing!
Has anyone any idea or any of you are able to reproduce the issue?










share|improve this question


























    up vote
    1
    down vote

    favorite












    I do not know if this is a known or unknown bug, but in my case, the prompt label appears ON the bar, not at the top of the bar, like the following:



    enter image description here



    It is the default search bar, dragged and dropped into a view and its constraints are set as they should be. As you can see only its placeholder and prompt attributes are changed.



    The problem occurs with iOS 12.1 (both simulator and device) and Xcode 10.1
    I was not able to find anything about it. I have to use that prompt thing!
    Has anyone any idea or any of you are able to reproduce the issue?










    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I do not know if this is a known or unknown bug, but in my case, the prompt label appears ON the bar, not at the top of the bar, like the following:



      enter image description here



      It is the default search bar, dragged and dropped into a view and its constraints are set as they should be. As you can see only its placeholder and prompt attributes are changed.



      The problem occurs with iOS 12.1 (both simulator and device) and Xcode 10.1
      I was not able to find anything about it. I have to use that prompt thing!
      Has anyone any idea or any of you are able to reproduce the issue?










      share|improve this question













      I do not know if this is a known or unknown bug, but in my case, the prompt label appears ON the bar, not at the top of the bar, like the following:



      enter image description here



      It is the default search bar, dragged and dropped into a view and its constraints are set as they should be. As you can see only its placeholder and prompt attributes are changed.



      The problem occurs with iOS 12.1 (both simulator and device) and Xcode 10.1
      I was not able to find anything about it. I have to use that prompt thing!
      Has anyone any idea or any of you are able to reproduce the issue?







      ios uisearchbar xcode10 ios12






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 5 at 17:27









      Arda Oğul Üçpınar

      3821723




      3821723
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          It gives you more flexible when you adjust the background offset.



          enter image description here



          After add Constraints, the running screen looks fine.



          enter image description here






          share|improve this answer





















          • background offset is a bad choice of name then, huh? weird.
            – Arda Oğul Üçpınar
            Nov 5 at 22:17










          • It's searchFieldBackgroundPositionAdjustment of UISearchBar
            – E.Coms
            Nov 5 at 23:19











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53159289%2fuisearchbar-prompt-appears-on-the-bar-not-at-top-of-it%23new-answer', 'question_page');
          }
          );

          Post as a guest
































          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          It gives you more flexible when you adjust the background offset.



          enter image description here



          After add Constraints, the running screen looks fine.



          enter image description here






          share|improve this answer





















          • background offset is a bad choice of name then, huh? weird.
            – Arda Oğul Üçpınar
            Nov 5 at 22:17










          • It's searchFieldBackgroundPositionAdjustment of UISearchBar
            – E.Coms
            Nov 5 at 23:19















          up vote
          2
          down vote



          accepted










          It gives you more flexible when you adjust the background offset.



          enter image description here



          After add Constraints, the running screen looks fine.



          enter image description here






          share|improve this answer





















          • background offset is a bad choice of name then, huh? weird.
            – Arda Oğul Üçpınar
            Nov 5 at 22:17










          • It's searchFieldBackgroundPositionAdjustment of UISearchBar
            – E.Coms
            Nov 5 at 23:19













          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          It gives you more flexible when you adjust the background offset.



          enter image description here



          After add Constraints, the running screen looks fine.



          enter image description here






          share|improve this answer












          It gives you more flexible when you adjust the background offset.



          enter image description here



          After add Constraints, the running screen looks fine.



          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 5 at 22:13









          E.Coms

          1,1141410




          1,1141410












          • background offset is a bad choice of name then, huh? weird.
            – Arda Oğul Üçpınar
            Nov 5 at 22:17










          • It's searchFieldBackgroundPositionAdjustment of UISearchBar
            – E.Coms
            Nov 5 at 23:19


















          • background offset is a bad choice of name then, huh? weird.
            – Arda Oğul Üçpınar
            Nov 5 at 22:17










          • It's searchFieldBackgroundPositionAdjustment of UISearchBar
            – E.Coms
            Nov 5 at 23:19
















          background offset is a bad choice of name then, huh? weird.
          – Arda Oğul Üçpınar
          Nov 5 at 22:17




          background offset is a bad choice of name then, huh? weird.
          – Arda Oğul Üçpınar
          Nov 5 at 22:17












          It's searchFieldBackgroundPositionAdjustment of UISearchBar
          – E.Coms
          Nov 5 at 23:19




          It's searchFieldBackgroundPositionAdjustment of UISearchBar
          – E.Coms
          Nov 5 at 23:19


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53159289%2fuisearchbar-prompt-appears-on-the-bar-not-at-top-of-it%23new-answer', 'question_page');
          }
          );

          Post as a guest




















































































          這個網誌中的熱門文章

          Tangent Lines Diagram Along Smooth Curve

          Yusuf al-Mu'taman ibn Hud

          Zucchini