Skip to content

Scope bar layout issue #7

@ashish-naik

Description

@ashish-naik

@ihomam I am using your code. Thank you.

I show scope bar using searchBarTextDidBeginEditing().

`func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) {

    if #available(iOS 11.0, *) {
        
    } else {

        self.searchBar!.showsCancelButton = true
        self.searchBar!.showsScopeBar = true
        self.searchBar!.sizeToFit()
    }
    self.collectionView?.reloadData()

}`

However, scope bar overlaps the collection view's first row.

How do i solve this and is there a simpler way to add search bar with scope bar for iOS 10 when using Xcode 9.3 and Swift 4?

Adding it in UItableView is so simple!!

Appreciate if you could help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions