rubygarage / collection-view-layouts Goto Github PK
View Code? Open in Web Editor NEWA library that implements custom flow layouts for iOS apps
License: Apache License 2.0
A library that implements custom flow layouts for iOS apps
License: Apache License 2.0
When i add object to array and call reloadData() it not recalculating the contentHeight properly
I've followed the How-to for the Example project but when I'm trying to build it I am getting "No such module 'collection_view_layouts' in ViewControllers/ViewController.swift.
What am I doing wrong? Or is something missing?
Regards.
how to instal in swift package manager?
Hi all,
Thanks for providing great layouts on 7 layout types (Tags, Pinterest, 500px, Instagram, Flipboard, Facebook, Flickr).
However, I would like to have a 3 x 3 layout which is similar to Flipboard Layout on second, third and fifth row, as per screenshot below:
What should I set to achieve this layout?
Thanks.
Just want to tell you the big thanks for this great lib! ๐๐ป๐
Hi,
As I tried to install this I am getting this warning:
[!] Unable to read the license file LICENSE
for the spec `collection-view-layouts (0.1.2)
and the framework is not working. Can you please help me?
Hi all,
First of all, thanks for this great library.
I have successfully implemented the Instagram layout into my iOS app.
Now, I am trying to implement one function whereby after clicked on either one of the display item, it will switch into another view controller.
I have tried with three methods of switching view controller (Segue / Identifier / AppDelegate) with respective settings in storyboard, but all does not success.
Overall Flow:
Settings Page -> Display All Instagram Layout Data -> Clicked Item -> Switch To Another View Controller
What should I do to successfully switch into another view controller after item clicked?
Thanks.
SettingsCVProvider Source Code:
import UIKit
import FAPanels
class SettingsCVProvider: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate {
var items = [[String]]()
// MARK: - UICollectionViewDataSource
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return items[section].count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ContentCellIdentifier", for: indexPath)
if let cell = cell as? CollectionViewContentCell {
let item = items[indexPath.section][indexPath.row]
cell.populate(with: item)
}
return cell
}
// MARK: - UICollectionViewDelegate
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
// handle tap events
NSLog("SettingsCVProvider collectionView() Clicked Item: \(indexPath.item)")
if(indexPath.item == 0) {
NSLog("SettingsCVProvider collectionView() Testing Confirm")
// Switch To Settings Page
// Method 1
performSegue(withIdentifier: "TestingConfirm", sender: self)
// Method 2
let mainStoryboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let identifier = "TestingConfirmNavigationVCIdentifier"
let finalVC: UIViewController = mainStoryboard.instantiateViewController(withIdentifier: identifier)
_ = panel!.center(finalVC)
// Method 3
// Initialize FA Panels Side Menu
let appDelegate = UIApplication.shared.delegate as? AppDelegate
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let TestingConfirmVC: TestingConfirmVC = storyboard.instantiateViewController(withIdentifier: "TestingConfirmNavigationVCIdentifier") as! TestingConfirmVC
// Set FA Panels Controllers
let rootController = FAPanelController()
rootController.center(TestingConfirmVC)
appDelegate?.window?.rootViewController = rootController
}
}
}
Seems your example is different from the current pod?
Althought I set kMaxCellsInRow = 2, it still shows 3 cells in a row of Px500FlowLayout. Pls check. Thanks.
nothing
[!] Unable to read the license file LICENSE
for the spec collection-view-layouts (0.1.2)
Hello,
Thank you for the library. It works well on my project.
However, there is a minor error when running pod install
. The warning is "[!] Unable to read the license file LICENSE
for the spec collection-view-layouts (0.1.2)
". As a result, it fails to achieve the license information in LICENSE file which is needed in my project.
I think the cause of the warning is the name of the license file, it should be LICENSE
(without .txt). Otherwise, Cocoapods won't be able to read the file.
Thank you again.
Tony Hoang
Hi
Just stumbled upon this library while looking to arrange items in different layouts.
How do I use this with images loaded from the web? As far as I've seen, the sample app returns cell size according to the length of the string placed in the corresponding item. I'd be very thankful if you could guide me as to how I could implement one of these layouts with URL of the image link.
Hi,
This library is missing the feature to make header sticky like tableView
for plain
style.
how to Handle Multiple Collection View in single delegate ? i have two collectionsone for tags and one for instagram layout but delegate is same so how to check which one is called first
collectionView.selectItem(at: indexPath, animated: true, scrollPosition: .centeredHorizontally)
is wrong in first or in last items
How to display collection header??
These function cannot be called.
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
print(kind)
let reusableview = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "headerID", for: indexPath) as! HeaderView
reusableview.frame = CGRect(x: 0, y: 0, width: 200, height: 60)
return reusableview
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
return CGSize(width: view.frame.width, height: 200)
}
I have been trying to set the TagsStyleFlowLayout to work with a horizontally scrolling UICollectionView but it seems the layout overrides this and forces it to scroll vertically.
It would be very useful to allow it scroll horizontally as well.
I am looking similar thing for android... if you know where i can find it can you share the link , Thanks
Please, add header and footer in your free time)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.