This is a Review posting app that let user find interesting places near them

Overview

ColorMatchTabs

cocoapods Swift 5 CocoaPods Compatible Carthage Compatible

Inspired by this project on Dribbble

Preview

Also, read how it was done in our blog

Installation

CocoaPods

pod 'ColorMatchTabs'

Carthage

github "Yalantis/ColorMatchTabs"

How to use

Complete screen

To setup and customize the component you should implement ColorMatchTabsViewControllerDataSource for ColorMatchTabsViewController.

public protocol ColorMatchTabsDataSource: class {
    
    func numberOfItems(inController controller: ColorMatchTabsViewController) -> Int
    
    func tabsViewController(controller: ColorMatchTabsViewController, viewControllerAt index: Int) -> UIViewController
    
    func tabsViewController(controller: ColorMatchTabsViewController, titleAt index: Int) -> String
    func tabsViewController(controller: ColorMatchTabsViewController, iconAt index: Int) -> UIImage
    func tabsViewController(controller: ColorMatchTabsViewController, hightlightedIconAt index: Int) -> UIImage
    func tabsViewController(controller: ColorMatchTabsViewController, tintColorAt index: Int) -> UIColor

}

To customize popup view controller create a subclass of PopoverViewController and set it in the view controller:

tabsViewController.popoverViewController = ExamplePopoverViewController()

Customization

The component contains of:

  • top tabbar
  • scrollable content view
  • plus button
  • popover view controller

Menu view controller aggregates the elements described above. If you want to fully customize or rearrange the elements, just create your own view controller instead of MenuViewController.

Support

Feel free to open issuses with any suggestions, bug reports, feature requests, questions.

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the animation.

P.S. We’re going to publish more awesomeness wrapped in code and a tutorial on how to make UI for iOS (Android) better than better. Stay tuned!

License

The MIT License (MIT)

Copyright (c) 2020 Yalantis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • Issue with visible content / and contentSizes after orientation change

    Issue with visible content / and contentSizes after orientation change

    PreCondition:

    • Example project
    • Enable landscape support

    Action:

    • Switch to 'Places' in portrait mode
    • Rotate device to landscape

    Result:

    • Half content view shows "Places" content and the other half (left side) showing content from first tab 'Products'

    Expected:

    • correct content size after orientation change

    Note:

    • ScrollMenu.swift L.123ff -> layoutContent()
    • I'll have a look at it tomorrow
    type: bug 
    opened by mooseDev 8
  • fatal error: Index out of range

    fatal error: Index out of range

    I have followed the example, and running the code results in the above error in the

    func moveHighlighterView(toItemAt toIndex: Int) {
            guard let countItems = dataSource?.numberOfItems(inTabSwitcher: self) where countItems > toIndex else {
                return
            }
    
            let toLabel = labels[toIndex]
            let toIcon = buttons[toIndex]
    
            // offset for first item
            let point = convertPoint(toIcon.frame.origin, toView: self)
            let offsetForFirstItem: CGFloat = toIndex == 0 ? -HighlighterViewOffScreenOffset : 0
            highlighterView.frame.origin.x = point.x + offsetForFirstItem
    
            // offset for last item
            let offsetForLastItem: CGFloat = toIndex == countItems - 1 ? HighlighterViewOffScreenOffset : 0
            highlighterView.frame.size.width = toLabel.bounds.width + (toLabel.frame.origin.x - toIcon.frame.origin.x) + 10 - offsetForFirstItem + offsetForLastItem
    
            highlighterView.backgroundColor = dataSource!.tabSwitcher(self, tintColorAt: toIndex)
        } 
    

    section of the ColorMatchTabs Source Code

    type: bug 
    opened by akhilm3 8
  • Desactivate swipe between tabs

    Desactivate swipe between tabs

    Hi everyone,

    On certain conditions I would like to deactivate the swipe gesture that allows to move between the tabs (to avoid to interfere with a slider I put in one of the tabs).

    Do you guys know how to deactivate the swipe gesture recognizer ? Or even better, how to handle both gesture at the same time, for example by using the gesture speed (slow: move slider, fast: change tab)

    Thanks !

    type: enhancement 
    opened by Yungbubu 7
  • Example Project installation with CocoaPods not possible?

    Example Project installation with CocoaPods not possible?

    I ran pod install for the Example project and tried to open the workspace and I get 48 errors. Tried a couple of different things and get the errors every time. Is there a problem with CocoaPods and this project?

    opened by inPhilly 7
  • Can not run the project in simulator

    Can not run the project in simulator

    diff: /../Podfile.lock: No such file or directory diff: /Manifest.lock: No such file or directory error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

    opened by alex4411144 6
  • visualize the ColorMatchTabs at the bottom.

    visualize the ColorMatchTabs at the bottom.

    I would like to know if you can place the component at the bottom of a viewcontroller, because I think it would be even better (and an important alternative). If yes, how? Or, you must change the component?

    example_colormatchtabs
    opened by j7ios 5
  • @IBInspectable Error

    @IBInspectable Error

    I keep getting this Error:

    Property cannot be marked @IBInspectable because its type cannot be represented in Objective-C

    on the following line of code in ColorMatchTabsViewControllerDataSource:

    @IBInspectable open weak var dataSource: ColorMatchTabsViewControllerDataSource? { }

    bildschirmfoto 2018-01-25 um 22 37 39
    opened by ghost 4
  • Swift 3.0 crashed with project

    Swift 3.0 crashed with project

    I know you converted your project to swift 3.0 but the project wont build with the workspace, xcode 8 keeps asking me to convert the project to swift 3.0. I know you converted the project but can you please respond and help me

    opened by jackpaster 4
  • Perform action based on which button is tapped ?

    Perform action based on which button is tapped ?

    Awesome project btw!

    How do i inform the controller which presented the popover view and circle menu which item on the circle menu was tapped?

    I know that I can override the "didSelectItemAt" method from with the popover view to get the index of the item that is tapped? but how do am i to notify the ColorMatchTabsViewController which tab to navigate to once an item on the circle menu is tapped?

    extension ExamplePopoverViewController {
        override func circleMenu(circleMenu: CircleMenu, didSelectItemAt index: Int) {
            if(index==0){
                //Checklists
    
            }else if(index==1){
                //Trips
    
    
            }else if(index==2){
                //Friends
    
            }
    
            super.circleMenu(circleMenu, didSelectItemAt: index)
        }
    }
    

    I see that didSelectItemAt simply calls hidePopover()

    extension PopoverViewController: CircleMenuDelegate {
    
        public func circleMenuWillDisplayItems(circleMenu: CircleMenu) {
            moveIconsToCircle()
            showContentView()
        }
    
        public func circleMenuWillHideItems(circleMenu: CircleMenu) {
            moveIconsToDefaultPositions()
            hideContentMenu()
        }
    
        public func circleMenu(circleMenu: CircleMenu, didSelectItemAt index: Int) {
            hidePopover()
        }
    
    }
    

    And hide popover dismisses the viewController

    private extension PopoverViewController {
    
        @objc func hidePopover(sender: AnyObject? = nil) {
            dismissViewControllerAnimated(true, completion: nil)
        }
    
    }
    

    Any suggestions would be greatly appreciated.

    Thanks in advance!

    type: enhancement 
    opened by jspenc72 4
  • Storyboard interface as a content

    Storyboard interface as a content

    Hi,

    I'm practicing with the example and I have a doubt if is it possible to create a interface with the storyboard and show it as content? In case that I want to create my own content and not just uitableviewController. I tried to get the reference from the storyboard but or crash or the content is empty.

    Thanks.

    type: enhancement 
    opened by jotayc 4
  • Cant download via cocapods

    Cant download via cocapods

    Hi, I am getting this error [!] Unable to find a specification for ColorMatchTabs (~> 1.0) I tried pod 'ColorMatchTabs', '~> 1.0' and I tried pod ColorMatchTabs (~> 1.0)

    opened by kcaglarr 4
  • The bar is under iPhone noutch

    The bar is under iPhone noutch

    Report

    I have main TapBar i want to add ColorMatchTabsViewController to one of my tabBar view controller, but it is full screened and i don't now how to fix it

    Your Environment

    • Version of the component: 3.3
    • Swift version: 5
    • iOS version: 14.5
    • Device: iPhone with notch
    • Xcode version: 12.5.1

    Screen Shot 2021-09-07 at 10 41 17 PM

    opened by SalarPro 0
  • the view is over safeArea how to fix it!

    the view is over safeArea how to fix it!

    Report

    The more information you provide, the faster we can help you.

    report a bug

    A feature request

    What do you want to add?

    Please describe what you want to add to the component.

    How should it look like?

    Please add images.

    Report a bug

    What did you do?

    Please replace this with what you did.

    What did you expect to happen?

    Please replace this with what you expected to happen.

    What happened instead?

    Please replace this with what happened instead.

    Your Environment

    • Version of the component: insert here
    • Swift version: insert here
    • iOS version: insert here
    • Device: insert here
    • Xcode version: insert here
    • If you use Cocoapods: run pod env | pbcopy and insert here
    • If you use Carthage: run carthage version | pbcopy and insert here

    Project that demonstrates the bug

    Please add a link to a project we can download that reproduces the bug.

    opened by SalarPro 0
  • Tabbar at bottom with navigation bar at top

    Tabbar at bottom with navigation bar at top

    I want tabor at bottom with navigation bar at top in swift

    I have already tried all the possible solutions already mentioned in issues section but nothing is working

    Please help me with this.

    opened by krina-pixster 0
  • By default tab selection index is 1 instead of 0

    By default tab selection index is 1 instead of 0

    Report

    The more information you provide, the faster we can help you.

    ⚠️ Select what you want - a feature request or report a bug. Please remove the section you aren't interested in.

    I need to select initially 1st tap but it is selecting zero tap default.

    I have a requirement, Please help me.

    Please describe what you want to add to the component.

    Which line of code I want to write it ?

    Please add images.

    Screenshot 2020-09-08 at 5 48 06 PM

    opened by KOSURUUDAYSAIKUMAR 1
Releases(3.3)
Owner
Yalantis
Knowledge is power and the way to get power is by sharing knowledge. We are open source because this is a smart way to live, work and play.
Yalantis
A custom ViewPager title strip which gives continuous feedback to the user when scrolling

SmartTabLayout A custom ViewPager title strip which gives continuous feedback to the user when scrolling. This library has been added some features an

ogaclejapan 7k Dec 30, 2022
youtube iOS app template written in swift 5

Youtube iOS Template Youtube iOS Template is developed by Haik Aslanyan and written in Swift 3. Purpose of this repo is to show how ViewControllers ca

Henry Aslanyan 2.5k Jan 4, 2023
SpaceAidExplorer - An app made for students who are not from Naples to explore places in and near Naples.

SpaceAidExplorer - An app made for students who are not from Naples to explore places in and near Naples. Made with love in Naples! Team Members Nicolas

Rishabh Dev 0 Nov 16, 2021
Review page interaction - handy and pretty way to ask for review.

RPInteraction Overview Review page interaction - handy and pretty way to ask for review. Inspired by dribbble shot. Requirements iOS8 Installation RPI

Nurdaulet Bolatov 27 Jul 16, 2021
Review page interaction - handy and pretty way to ask for review

RPInteraction Overview Review page interaction - handy and pretty way to ask for review. Inspired by dribbble shot. Requirements iOS8 Installation RPI

Nurdaulet Bolatov 27 Jul 16, 2021
A UIKit based geotagging app that let's you save places you have visited with images.

My Locations Getting Started Using Core Location A CLLocationManager() performs the location updating It sends its updates to its delegate, so make su

Xiao Quan 全笑 0 Jan 4, 2022
Get location of user and show near cities and weather of the cities for next 6 days. (iOS)

technical-assignment-Weather-App This project written in Swift by Emre Kılınc You need to have Xcode installed. Please open weather_app.xcworkspace wi

Emre Kilinc 1 May 27, 2022
Find and save your favorite places!

Reqs Recommendation app to search for, organize, and save the places you love. TODOs: Implement UserDefaults for settings Complete annotation screen w

Joseph Gilmore 3 Nov 7, 2022
Custom UIView class that hosts an array of UIbuttons that have an 'underline' UIView beneath them which moves from button to button when the user presses on them.

Swift-Underlined-Button-Bar Custom UIView class that hosts an array of UIbuttons that have an 'underline' UIView beneath them which moves from button

Justin Cook 3 Aug 4, 2022
🍞 An async waiting toast with basic toast. Inspired by facebook posting toast

AwaitToast ?? An async waiting toast with basic toast. Inspired by facebook posting toast. Introduction Usage Default let toast: Toast = Toast.default

DongHee Kang 137 Jul 30, 2022
Vapor-telemetrydeck - Vapor client for posting signals to TelemetryDeck, a privacy-conscious analytics service for apps and websites

Vapor-telemetrydeck - Vapor client for posting signals to TelemetryDeck, a privacy-conscious analytics service for apps and websites

Sidetrack 7 Jun 16, 2022
Near-Earth Asteroids Information using NeoWs Api.

AsteroidNews Example project which uses SceneKit framework to show objects with Near-Earth Asteroids information. Frameworks SceneKit Alamofire Swifty

Simranjeet 1 Dec 30, 2021
Near Procedure Call between flutter and native.

npcx A new flutter plugin project. Getting Started This project is a starting point for a Flutter plug-in package, a specialized package that includes

null 0 Jun 17, 2022
INTUZ is presenting an interesting a Multilevel Expand/Collapse UITableView App Control to integrate inside your native iOS-based application

INTUZ is presenting an interesting a Multilevel Expand/Collapse UITableView App Control to integrate inside your native iOS-based application. MultilevelTableView is a simple component, which lets you use the tableview with multilevel tree view in your project.

INTUZ 3 Oct 3, 2022
Markdown in SwiftUI, and some other interesting components.

RoomTime RoomTime is a bundle of tools developed in my app RoomTime Lite. ( ?? RoomTime Lite is still in development) Features TextArea AutoWrap Markd

Chen SiWei 56 Dec 20, 2022
INTUZ is presenting an interesting a custom alert view in SwiftUI

Introduction INTUZ is presenting an interesting a custom alert view in SwiftUI, App Control to integrate inside your native iOS-based application. Cus

INTUZ 2 Jul 10, 2022
Scutil - The swift version of my ASOC scutilUtil application. An interesting learning excercise

scutil this is the swift version of my ASOC "scutilUtil" application. An interes

null 1 Feb 15, 2022
Help Victorians (from Australia) find exposure sites around them, and other features too

Exposure VIC app Find exposure sites near you and keep everyone safe Information This is a concept app that pulls data from the Victorian Government d

Mark Battistella 5 Apr 6, 2022