• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Enabling UISearchBar cancel button?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enabling UISearchBar cancel button?


  • Subject: Re: Enabling UISearchBar cancel button?
  • From: "Gary L. Wade" <email@hidden>
  • Date: Thu, 12 Jan 2017 13:18:46 -0800

Your experience mirrors my own.  Look at what I wrote, and you should be closer to your goals.  I was also using a customized refresh control, and it appears sufficiently correct when pulling, between the search bar and collection view.  You might need to adjust some values for your needs, though.
--
Gary L. Wade
http://www.garywade.com/ <http://www.garywade.com/>
> On Jan 12, 2017, at 12:57 PM, Rick Mann <email@hidden> wrote:
>
> I need my search bar to appear under the nav bar. We also have an extra view outside and above the collection view. On top of that, I don't create a new view for the results, but rather use the existing view. Once the user selects an item that causes a push, and then goes back, everything is wonky. This is in part due to a modal presentation of the search controller. I tried to change that, but I could not get the UISearchBar to present the way I wanted to (inserting it into the view hierarchy and adding constraints just didn't seem to work right)
>
> Now that I control the UISearchBar, it's always there, and all I do is adjust the top constraint constant. The only problem is that the cancel button behaves differently.
>
> I'm going to try to explicitly set focus in the search field.
>
>> On Jan 12, 2017, at 08:52 , Gary L. Wade <email@hidden> wrote:
>>
>> In what way is its controller getting in the way? Those do a lot together. If used with a collection view, you might find my solution helps:
>>
>> https://whatweretheythinkingblog.wordpress.com/2016/11/19/effectively-using-uisearchcontroller-with-uicollectionview/
>> --
>> Gary L. Wade (Sent from my iPad)
>> http://www.garywade.com/
>>
>> On Jan 11, 2017, at 8:17 PM, Rick Mann <email@hidden> wrote:
>>
>>> I'm creating and displaying a UISearchBar without using UISearchController (it gets in the way).
>>>
>>> My UISearchBar is installed in the storyboard via IB. I animate it into position in my UI when the user taps a button. However, the Cancel button is disabled. I pre-load the search bar with the text of the last search, so the button should be enabled.
>>>
>>> Before, when I was using UISearchController, it was enabled. Now it's not, until the user taps on it!
>>>
>>> Any idea how to enable it? Thanks!
>>>
>>> --
>>> Rick Mann
>>> email@hidden
>>>
>
>
> --
> Rick Mann
> email@hidden
>
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Enabling UISearchBar cancel button? (From: Rick Mann <email@hidden>)
 >Re: Enabling UISearchBar cancel button? (From: "Gary L. Wade" <email@hidden>)
 >Re: Enabling UISearchBar cancel button? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Enabling UISearchBar cancel button?
  • Next by Date: NSNetServiceBrowser vs. mDNSResponder
  • Previous by thread: Re: Enabling UISearchBar cancel button?
  • Next by thread: Re: Enabling UISearchBar cancel button?
  • Index(es):
    • Date
    • Thread