Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mokagio/UICollectionViewRightAlignedLayout
A layout for UICollectionView that aligns the cells to the right.
https://github.com/mokagio/UICollectionViewRightAlignedLayout
Last synced: 3 months ago
JSON representation
A layout for UICollectionView that aligns the cells to the right.
- Host: GitHub
- URL: https://github.com/mokagio/UICollectionViewRightAlignedLayout
- Owner: mokagio
- License: mit
- Created: 2014-04-22T18:53:12.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-02-19T13:25:23.000Z (12 months ago)
- Last Synced: 2024-10-31T10:03:15.883Z (3 months ago)
- Language: Objective-C
- Size: 169 KB
- Stars: 168
- Watchers: 7
- Forks: 29
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - UICollectionViewRightAlignedLayout - A layout for UICollectionView that aligns the cells to the right. (etc)
README
UICollectionView Right Aligned Layout
====================================A `UICollectionViewLayout` implementation that aligns the cells to the right.
_Check out the twin project [`UICollectionViewLeftAlignedLayout`](https://github.com/mokagio/UICollectionViewLeftAlignedLayout)_
## Installation with CocoaPods
```ruby
platform :ios, '6.0'pod 'UICollectionViewRightAlignedLayout'
```## Usage
Simply set `UICollectionViewRightAlignedLayout` as the layout object for your collection view either via code:
```objc
CGRect frame = ...
UICollectionViewRightAlignedLayout *layout = [UICollectionViewRightAlignedLayout alloc] init];
UICollectionView *RightAlignedCollectionView = [[UICollectionView alloc] initWithFrame:frame collectionViewLayout:layout];
```or from Interface Builder:
_img needed here_
`UICollectionViewRightAlignedLayout` is a subclass of `UICollectionViewFlowLayout`, so your collection view delegate can use all the delegate methods of [`UICollectionViewDelegateFlowLayout`](https://developer.apple.com/library/ios/documentation/uikit/reference/UICollectionViewDelegateFlowLayout_protocol/Reference/Reference.html).
For those of you who like consistency there is an `UICollectionViewDelegateRightAlignedLayout` protocol that your delegate object can conform to. Is nothing more than an empty extension of `UICollectionViewDelegateFlowLayout`.
## License
`UICollectionViewRightAlignedLayout` is released under the [MIT license](https://github.com/mokagio/UICollectionViewRightAlignedLayout/blob/master/LICENSE).
---
Hacked together with passion by [@mokagio](https://twitter.com/mokagio)