Giter Site home page Giter Site logo

flix's Introduction

Hi there 👋

During my spare time, I engage in various activities:

  • Addressing LLVM issues.
  • Addressing Rust issues labeled as A-LLVM or A-mir-opt.
  • Developing the Ruslin note-taking application.
  • Expanding my knowledge of programming languages.
  • Learning Neovim.
  • Improving my English language skills.
  • Playing Splatoon 3.

If you need to contact me for any reason, feel free to send me an email at dianqk📧dianqk.net. You can also contact me as follows.

Other contact details

WhatsApp Telegram
https://wa.me/qr/P5C6UX47WWZOG1 https://t.me/dianqk
If I don't respond in time, please send an email.

flix's People

Contributors

dianqk avatar karstengresch avatar pircate avatar

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  avatar  avatar  avatar  avatar  avatar  avatar

flix's Issues

Align all nodes/CollectionViewCells from bottom ?

HEy Dian,
Is there is built-in support that can align collectionview cells(providers) from bottom ?
(By default, when you add a new provider/cell, it will be added from top of the screen and following last provider/cell. My quest here is if there is a built-in support or easy way to achieve align from bottom: first cell go to bottom of the screen and second following that on top of it ? )

How does Flix handle scroll ?

TL;DR
How does Flix handle scroll activity ? or does it provide sth like didScroll, didEndScroll, etc. ?

More:
When I was trying to figure the above out, more things came to me:
I found that if I set collectionView to current viewcontroller where all cells are built for, then all cells are messed up, so guessing the delegate for either tableview/collectionview is set somewhere, but cant seem to find it.
The actual delegate be set to is: RxCocoa.RxCollectionViewDelegateProxy , any idea to port that to current view controller where we need to build nodes/cells ?

RxSwift 5

It would be nice to support RxSwift 5.

XCode 10.2 Build Error

After updating to xcode 10.2 I'm receiving the following error and it prevents me from building

Screen Shot 2019-03-30 at 11 28 58 PM

Q&A

  1. Can I make a UIViewController as Provider?
  2. Should I know RxSwift, RxCocoa and RxDataSources?

Segmentation fault: 11 While emitting IR SIL function ...

Maybe you will find Segmentation fault: 11 While emitting IR SIL function ... error info when use AnimatableCollectionViewProvider. This look like Swift bug.

This issue will closed when this error go away.

This code will cause Segmentation fault: 11:

class TestRadioProvider<Option: Equatable & StringIdentifiableType>: AnimatableCollectionViewProvider {
    func configureCell(_ collectionView: UICollectionView, cell: RadioCollectionViewCell, indexPath: IndexPath, value: Value) {
    }
    func createValues() -> Observable<[Value]> {
        return Observable.empty()
    }
    typealias Cell = RadioCollectionViewCell
    typealias Value = Option
}

There are some workaround methods:

add createAnimatableNodes:

class TestRadioProvider<Option: Equatable & StringIdentifiableType>: AnimatableCollectionViewProvider {
    func configureCell(_ collectionView: UICollectionView, cell: RadioCollectionViewCell, indexPath: IndexPath, value: Value) {
    }
    func createValues() -> Observable<[Value]> {
        return Observable.empty()
    }
    typealias Cell = RadioCollectionViewCell
    typealias Value = Option
    func createAnimatableNodes() -> Observable<[IdentifiableNode]> {
        let providerIdentity = self._flix_identity
        return createValues()
            .map { $0.map { IdentifiableNode(providerIdentity: providerIdentity, valueNode: $0) } }
    }
}

or add a model to warp this Option:

struct SegmentationFault11Warp<Value: Equatable & StringIdentifiableType>: Equatable & StringIdentifiableType {
    var identity: String {
        return value.identity
    }
    let value: Value
}

class TestRadioProvider<Option: Equatable & StringIdentifiableType>: AnimatableCollectionViewProvider {
    func configureCell(_ collectionView: UICollectionView, cell: RadioCollectionViewCell, indexPath: IndexPath, value: Value) {
    }
    func createValues() -> Observable<[Value]> {
        return Observable.empty()
    }
    typealias Cell = RadioCollectionViewCell
    typealias Value = SegmentationFault11Warp<Option>
}

Why my `tap action` is not working?

I write the code in viewDidLoad function at my viewController:

let provider = WNFlixAddButtonProvider()
 provider.tap.subscribe(onNext: { _ in
        print("Ooops")
}).disposed(by: self.disposeBag)
tableView.flix.build([provider])

And WNFlixAddButtonProvider is just based on UniqueCustomTableViewProvider:

class WNFlixAddButtonProvider: UniqueCustomTableViewProvider {
        
    let addButton = UIButton().then {
        $0.backgroundColor = .red
        $0.setTitle("+ Work Experience", for: .normal)
        $0.setTitleColor(UIColor.blue, for: .normal)
        $0.titleLabel?.font = Specs.font.regular
    }
    
    override init() {
        super.init()
        
        contentView.addSubview(addButton)
        
        addButton.snp.makeConstraints { (make) in
            make.edges.equalToSuperview()
        }
    }
}

When I run the project, the UI look's perfect, but when I tap the addButton, it's not working.

I find some code at: Flix/Example/Example/LoginViewController.swift, the tap action works:

loginProvider.tap
            .withLatestFrom(isVerified).filter { $0 }
            .subscribe(onNext: { [weak self] _ in
                let alert = UIAlertController(title: "Success", message: nil, preferredStyle: .alert)
                alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { (_) in
                    self?.navigationController?.popViewController(animated: true)
                }))
                self?.present(alert, animated: true, completion: nil)
            })
            .disposed(by: disposeBag)

Some code I miss?

After network request, tableView build the providers will offset some distance.

After network request in viewDidLoad function, I want to build the providers according to the network data.

// <NSThread: 0x170076e40>{number = 1, name = main}
let provider = WNFlixTitleTextFieldProvider(title: "Title", placeholder: "Placeholder")
self.tableView.flix.build([provider])

1.jpg

But if I just write this code in viewDidLoad function rather than after network request, it's good:
2.jpg

Add `GroupProvider`

  • Add TableViewGroupProvider
  • Add AnimatableTableViewGroupProvider
  • Add CollectionViewGroupProvider
  • Add AnimatableCollectionViewGroupProvider

Doesn't conform to protocol NSObjectProtocol

Thank you for your open source library, I have benefited a lot.

I've been using Objective-C for years, but I recently started using Swift in my work, so I do not know deep about it.

When I integrated a library (FSPagerView) I found that I needed to implement the ' NSObjectProtocol ' protocol, which I believe is the problem with this library interacting with Objective-C, and I want to ask if there is any suggestion? Thanks.

image
image

Is there a way to use `UniqueCommentTextProvider` in `SettingsViewController`

First, Great work!!
New to this, and have a quick question regarding the example provided:

In Do Not Disturb VC, there is this UniqueCommentTextProvider, how can that be used in SettingsViewController ? (it does not allow now as the former is a collection view cell, while the latter is mainly on a tableview) - so the question could also be: how to write a similar UniqueCommentTextProvider for collectionviewcell ?
Thanks ahead!!

Build Failed Task failed with exit code 65:

*** Building scheme "Flix" in Flix.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace ... -scheme Flix -configuration Release -derivedDataPath ../org.carthage.CarthageKit/DerivedData/9.1_9B55/Flix/1.0.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath ./ SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO (launched in /Users/..)

i use xcode 9.1 with carthage update --platform iOS --no-use-binaries
what i'm missing?

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.