All Projects → josshad → Ehhorizontalselectionview

josshad / Ehhorizontalselectionview

Licence: mit
Horizontal table view style controller

Projects that are alternatives of or similar to Ehhorizontalselectionview

Vbpiledview
Simple and beautiful stacked UIView to use as a replacement for an UITableView, UIImageView or as a menu
Stars: ✭ 164 (-52.6%)
Mutual labels:  cocoapods, uicollectionview, collectionview
Infinitecollectionview
Infinite horizontal scrolling using UICollectionView.
Stars: ✭ 218 (-36.99%)
Mutual labels:  cocoapods, uicollectionview
Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift
Stars: ✭ 3,395 (+881.21%)
Mutual labels:  cocoapods, uicollectionview
Rhplaceholder
Show pleasant loading view for your users 😍
Stars: ✭ 238 (-31.21%)
Mutual labels:  cocoapods, ios-ui
Campcotcollectionview
Collapse and expand UICollectionView sections with one method call.
Stars: ✭ 161 (-53.47%)
Mutual labels:  cocoapods, uicollectionview
Collor
A declarative-ui framework for UICollectionView with great and useful features.
Stars: ✭ 182 (-47.4%)
Mutual labels:  cocoapods, uicollectionview
Swiftpagemenu
Customizable Page Tab Menu Controller 👍
Stars: ✭ 233 (-32.66%)
Mutual labels:  cocoapods, ios-ui
Stickyheaderflowlayout
Sticky headers for UICollectionView written in pure Swift (based on CSStickyHeaderFlowLayout)
Stars: ✭ 144 (-58.38%)
Mutual labels:  cocoapods, uicollectionview
SPRCollectionView
iOS:使用CollectionView实现Wallet效果
Stars: ✭ 97 (-71.97%)
Mutual labels:  ios-ui, collectionview
Containercontroller
UI Component. This is a copy swipe-panel from app: Apple Maps, Stocks. Swift version
Stars: ✭ 273 (-21.1%)
Mutual labels:  cocoapods, collectionview
Fapaginationlayout
Collection view pagination layout
Stars: ✭ 276 (-20.23%)
Mutual labels:  cocoapods, collectionview
Wobbly
(Animate CSS) animations for iOS. An easy to use library of iOS animations. As easy to use as an easy thing.
Stars: ✭ 150 (-56.65%)
Mutual labels:  cocoapods, ios-ui
Eureka
Elegant iOS form builder in Swift
Stars: ✭ 11,345 (+3178.9%)
Mutual labels:  cocoapods, ios-ui
Calendarkit
📅 Calendar for Apple platforms in Swift
Stars: ✭ 2,049 (+492.2%)
Mutual labels:  cocoapods, ios-ui
Xlactioncontroller
Fully customizable and extensible action sheet controller written in Swift
Stars: ✭ 3,228 (+832.95%)
Mutual labels:  cocoapods, ios-ui
Admozaiccollectionviewlayout
ADMozaicCollectionViewLayout is yet another UICollectionViewLayout subclass that implements "brick", "mozaic" or Pinterest style layout.
Stars: ✭ 226 (-34.68%)
Mutual labels:  cocoapods, uicollectionview
Poliopager
A flexible TabBarController with search tab like SNKRS.
Stars: ✭ 133 (-61.56%)
Mutual labels:  cocoapods, ios-ui
Closures
Swifty closures for UIKit and Foundation
Stars: ✭ 1,720 (+397.11%)
Mutual labels:  cocoapods, uicollectionview
SNCollectionViewLayout
Collection View Layouts is a set of custom flow layouts for iOS which imitate general data grid approaches for mobile apps.
Stars: ✭ 100 (-71.1%)
Mutual labels:  uicollectionview, collectionview
Gemini
Gemini is rich scroll based animation framework for iOS, written in Swift.
Stars: ✭ 2,965 (+756.94%)
Mutual labels:  cocoapods, uicollectionview

EHHorizontalSelectionView

This is extension for presenting horizontal lists of items (horizontal tableview)

Installation

CocoaPods

To install EHHorizontalSelectionView using CocoaPods, please integrate it in your existing Podfile, or create a new Podfile:

target 'MyApp' do
  pod 'EHHorizontalSelectionView'
end

Then run pod install.

Manual

Add files from EHHorizontalSelectionView to your project

Usage

#import <EHHorizontalSelectionView/EHHorizontalSelectionView.h>

You can use EHHorizontalSelectionView as outlet in your xib or storyboard

@property (nonatomic, weak) IBOutlet EHHorizontalSelectionView * hSelView;

Default style of table is with EHHorizontalViewCell cells. To change default behaviour you need register another cell class or cell nib. Custom cell must subclassed from EHHorizontalViewCell.

For example cell types with animated selection:

[_hSelView registerCellWithClass:[EHHorizontalLineViewCell class]];
[_hSelView1 registerCellWithClass:[EHRoundedHorizontalViewCell class]];

or your custom cell:

[_hSelView2 registerCellNib:[UINib nibWithNibName:@"MyCustomCellNib" bundle:nil] withClass:[EHHorizontalViewCell class]];

Setting delegate:

_hSelView1.delegate = self;

Delegate needs for getting data for selection view:

- (NSUInteger)numberOfItemsInHorizontalSelection:(EHHorizontalSelectionView*)hSelView
- (NSString *)titleForItemAtIndex:(NSUInteger)index forHorisontalSelection:(EHHorizontalSelectionView*)hSelView

and for receiving selection event:

- (void)horizontalSelection:(EHHorizontalSelectionView * _Nonnull)hSelView didSelectObjectAtIndex:(NSUInteger)index;

Tips

In case of "the behavior of the UICollectionViewFlowLayout is not defined because:" may help:

self.automaticallyAdjustsScrollViewInsets = NO;

Customization

IB customization

After 1.3.0 you can use IB to change selection view apperance. There was presented a set of properties allowing to change the appearance of the view. EHHorizontalSelcetionView is now marked as IBDesignable and you can see customization on your xib or storyboard

Color

You can change default tint color for cell of selected type

[EHHorizontalLineViewCell updateTintColor:[UIColor colorWithHex:0x00c264]];

You can subclass cell of that type and override method + (UIColor * _Nonnull)tintColor;

+ (UIColor *)tintColor
{
  return [UIColor redColor];
}

Or you can change tint color for chosen selection view

    [_hSelView2 setTintColor:[UIColor colorWithHex:0xff46c7]];

Fonts

Change default appearance

[EHRoundedHorizontalViewCell updateFontMedium:[UIFont boldSystemFontOfSize:15]];
[EHRoundedHorizontalViewCell updateFont:[UIFont systemFontOfSize:15]];

Change for chosen selectionView

[_hSelView3 setFont:[UIFont systemFontOfSize:17]];

Additional width for cell (inset)

Change default appearance

[EHHorizontalLineViewCell updateCellGap:20];

Change for chosen selectionView

[_hSelView3 setCellGap:15.f];    

Line height (for EHHorizontalLineViewCell)

[EHHorizontalLineViewCell updateColorHeight:2];

Author

Danila Gusev

[email protected]

License

Usage is provided under the MIT License. See LICENSE for full details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].