noblakit01 / photocollectionview Goto Github PK
View Code? Open in Web Editor NEWCustom CollectionView like as Facebook Feed for iOS
License: MIT License
Custom CollectionView like as Facebook Feed for iOS
License: MIT License
Hi, i'm having problems with the lastest version, I set the datasource = self but the function is not triggered
Why images is not showing with the url ? It was showing before uninstall but after uninstall then reinstall it is now showing only indicator is moving.
`extension HomeVC: PhotoCollectionViewDataSource, PhotoCollectionViewDelegate {
func photoCollectionView(_ photoCollectionView: PhotoCollectionView, photoSource index: Int) -> PhotoSource {
let mediatype = arrayMedia[index].mediaType
if mediatype == 0 {
let mediaurl = arrayMedia[index].mediaUrls
let device = UIDevice.modelName
for allsubimages in mediaurl {
let url = (allsubimages as AnyObject).object(forKey: "url") as? String
print(url)
let size = (allsubimages as AnyObject).object(forKey: "size") as? String
let _id = (allsubimages as AnyObject).object(forKey: "_id") as? String
switch device {
case "iPhone 4", "iPhone 4s", "iPhone 5", "iPhone 5s", "iPhone 5c", "iPhone SE", "Simulator iPhone 4", "Simulator iPhone 4s", "Simulator iPhone 5", "Simulator iPhone 5s", "Simulator iPhone 5c", "Simulator iPhone SE":
if size == "40x40"
{
imagesFromData = url
break
}
case "iPhone 6", "iPhone 6s", "iPhone 7", "iPhone 8", "Simulator iPhone 6", "Simulator iPhone 6s", "Simulator iPhone 7", "Simulator iPhone 8":
if size == "75x75"
{
imagesFromData = url
break
}
case "iPhone 6 Plus","iPhone 6s Plus","iPhone 7 Plus","iPhone 8 Plus","Simulator iPhone 6s Plus", "Simulator iPhone 7 Plus", "Simulator iPhone 6 Plus", "Simulator iPhone 8 Plus" :
if size == "125x125"
{
imagesFromData = url
break
}
case "iPhone X","iPhone XS","iPhone XS Max","iPhone XR", "Simulator iPhone XR", "Simulator iPhone XS Max", "Simulator iPhone XS", "Simulator iPhone X" :
if size == "275x275"
{
imagesFromData = url
break
}
default:
break
}
}
} else { // For Video URL
}
return .url(URL(string: imagesFromData!))
}
func numPhotos(in photoCollectionView: PhotoCollectionView) -> Int {
return arrayMedia.count
}
}`
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.