abdullahselek / ascollectionview Goto Github PK
View Code? Open in Web Editor NEWLightweight custom collection view inspired by Airbnb.
License: MIT License
Lightweight custom collection view inspired by Airbnb.
License: MIT License
hi when i run app error:
2017-09-26 01:48:52.421 collectionTest[6050:90252] Unknown class _TtC16ASCollectionView16ASCollectionView in Interface Builder file.
(lldb)
How can i resize the header label and make the cell smaller
Hi, I have a problem when I use this library for my collection which in UITableViewCell. Because I don't know height of this collection is returned. Hope you let me know soon! Thanks.
I would like to understand the difference between ParallaxCell and UICollectionViewCell.
I would like to get TapEvent on Cell.
How can I do ?
I tried the simple code like your demo, but I couldn't....
I don't understand why this error message shows.
I would like to tell me the reason.
When the indexPath.row == 3, sumilator crash and shows the error "CollectionView layout should be extended ASCollectionViewLauout".
class VC_Question: UIViewController, ASCollectionViewDataSource, ASCollectionViewDelegate {
@IBOutlet weak var collectionView: ASCollectionView!
var numberOfItems: Int = 10
let collectionElementKindHeader = "Header";
let collectionElementKindMoreLoader = "MoreLoader";
override func viewDidLoad() {
super.viewDidLoad()
collectionView.register(UINib(nibName: collectionElementKindHeader, bundle: nil), forSupplementaryViewOfKind: collectionElementKindHeader, withReuseIdentifier: "header")
collectionView.delegate = self
collectionView.asDataSource = self
}
// MARK: ASCollectionViewDataSource
func numberOfItemsInASCollectionView(_ asCollectionView: ASCollectionView) -> Int {
return numberOfItems
}
func collectionView(_ asCollectionView: ASCollectionView, cellForItemAtIndexPath indexPath: IndexPath) -> UICollectionViewCell {
let questionCell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! QuestionCell
return questionCell
}
func collectionView(_ asCollectionView: ASCollectionView, parallaxCellForItemAtIndexPath indexPath: IndexPath) -> ASCollectionViewParallaxCell {
let parallaxCell = collectionView.dequeueReusableCell(withReuseIdentifier: "parallaxCell", for: indexPath) as! ParallaxCell
return parallaxCell
}
func collectionView(_ asCollectionView: ASCollectionView, headerAtIndexPath indexPath: IndexPath) -> UICollectionReusableView {
let header = collectionView.dequeueReusableSupplementaryView(ofKind: ASCollectionViewElement.Header, withReuseIdentifier: "header", for: indexPath)
return header
}
func loadMoreInASCollectionView(_ asCollectionView: ASCollectionView) {
if numberOfItems > 30 {
collectionView.enableLoadMore = false
return
}
numberOfItems += 10
collectionView.loadingMore = false
collectionView.reloadData()
}
}
import Foundation
import ASCollectionView
class QuestionCell: UICollectionViewCell {
}
import Foundation
import UIKit
import ASCollectionView
class ParallaxCell: ASCollectionViewParallaxCell {
}
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.