Giter Site home page Giter Site logo

iwheelbuy / squaremosaiclayout Goto Github PK

View Code? Open in Web Editor NEW
256.0 11.0 18.0 1.3 MB

An extandable mosaic UICollectionViewLayout with a focus on extremely flexible customizations :large_orange_diamond:

License: MIT License

Swift 100.00%
uicollectionview uicollectionviewlayout uicollectionviewflowlayout uikit uitableview swift ios

squaremosaiclayout's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

squaremosaiclayout's Issues

set shadow for section

Hi, I set shadow for section but doesn't effect on section
`func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
switch kind {
case SquareMosaicLayoutSectionBacker:
let view: UICollectionReusableView = collectionView.dequeueSupplementary(kind, indexPath: indexPath, kind: kind)
view.layer.backgroundColor = UIColor.white.cgColor
view.layer.roundedAllCorner(width: 5, height: 5)
view.layer.borderColor = UIColor.clear.cgColor
view.layer.shadowColor = UIColor.lightGray.cgColor
view.layer.shadowOffset = CGSize(width: 13, height: 13)
view.layer.shadowOpacity = 15
view.layer.shadowRadius = 12
view.layer.masksToBounds = false
view.masksToBounds = false
return view
case SquareMosaicLayoutSectionHeader:
let view: UICollectionReusableView = collectionView.dequeueSupplementary(kind, indexPath: indexPath, kind: kind)
view.layer.backgroundColor = UIColor.clear.cgColor

        let label = UILabel()
        label.text = "header"
        label.font = UIFont.systemFont(ofSize: 20)
        label.textAlignment = .center
        label.frame = view.bounds
        view.addSubview(label)
        
        return view
    default:
        fatalError()
    }
}`

Lazy computation for layout attributes

When collection view has thousands of items then method prepare() works slow that causes some lags/freezes, especially it is noticeable on device orientation change. Thanks.

iOS 8 Support

Hi, I'm wondering why the deploy target is iOS 9.0.
I tried the demo app on iOS 8.1 and it works quite normal.

Is there any other issue I didn't notice?

Objective C Usage?

Is this compatible with objective c? I am able to import it by using the following code, but cannot initialize it.

#import "SquareMosaicLayout-Swift.h"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.